2017-05-22 20:58:25 +02:00
|
|
|
import * as Sequelize from 'sequelize'
|
2017-07-05 13:26:25 +02:00
|
|
|
import * as Promise from 'bluebird'
|
2017-05-22 20:58:25 +02:00
|
|
|
|
2017-07-10 19:43:21 +02:00
|
|
|
import { VideoRateType } from '../../../shared/models/videos/video-rate.type'
|
2017-06-16 10:36:18 +02:00
|
|
|
|
2017-05-22 20:58:25 +02:00
|
|
|
export namespace UserVideoRateMethods {
|
2017-07-11 16:01:56 +02:00
|
|
|
export type Load = (userId: number, videoId: number, transaction: Sequelize.Transaction) => Promise<UserVideoRateInstance>
|
2017-05-22 20:58:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserVideoRateClass {
|
|
|
|
load: UserVideoRateMethods.Load
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserVideoRateAttributes {
|
2017-06-16 10:36:18 +02:00
|
|
|
type: VideoRateType
|
2017-08-25 18:36:49 +02:00
|
|
|
userId: number
|
|
|
|
videoId: number
|
2017-05-22 20:58:25 +02:00
|
|
|
}
|
|
|
|
|
2017-06-10 22:15:25 +02:00
|
|
|
export interface UserVideoRateInstance extends UserVideoRateClass, UserVideoRateAttributes, Sequelize.Instance<UserVideoRateAttributes> {
|
2017-05-22 20:58:25 +02:00
|
|
|
id: number
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserVideoRateModel extends UserVideoRateClass, Sequelize.Model<UserVideoRateInstance, UserVideoRateAttributes> {}
|