]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/user/user-video-rate-interface.ts
Create types for model enums
[github/Chocobozzz/PeerTube.git] / server / models / user / user-video-rate-interface.ts
index e48869fd22a676d6d6a928579fb6b44f08cc3ffd..a726639b1e7578b347cb13c68bcd2db6cc1f4d90 100644 (file)
@@ -1,8 +1,10 @@
 import * as Sequelize from 'sequelize'
 
+import { VideoRateType } from '../../../shared/models/user-video-rate.model'
+
 export namespace UserVideoRateMethods {
   export type LoadCallback = (err: Error, userVideoRateInstance: UserVideoRateInstance) => void
-  export type Load = (userId, videoId, transaction, callback) => void
+  export type Load = (userId: number, videoId: string, transaction: Sequelize.Transaction, callback: LoadCallback) => void
 }
 
 export interface UserVideoRateClass {
@@ -10,7 +12,7 @@ export interface UserVideoRateClass {
 }
 
 export interface UserVideoRateAttributes {
-  type: string
+  type: VideoRateType
 }
 
 export interface UserVideoRateInstance extends UserVideoRateClass, UserVideoRateAttributes, Sequelize.Instance<UserVideoRateAttributes> {