1
0
Fork 0
peertube/server/models/user/user-video-rate-interface.ts

27 lines
822 B
TypeScript
Raw Normal View History

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