1
0
Fork 0
peertube/server/models/user/user-video-rate-interface.ts
2017-08-25 18:36:49 +02:00

26 lines
822 B
TypeScript

import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'
import { VideoRateType } from '../../../shared/models/videos/video-rate.type'
export namespace UserVideoRateMethods {
export type Load = (userId: number, videoId: number, transaction: Sequelize.Transaction) => Promise<UserVideoRateInstance>
}
export interface UserVideoRateClass {
load: UserVideoRateMethods.Load
}
export interface UserVideoRateAttributes {
type: VideoRateType
userId: number
videoId: number
}
export interface UserVideoRateInstance extends UserVideoRateClass, UserVideoRateAttributes, Sequelize.Instance<UserVideoRateAttributes> {
id: number
createdAt: Date
updatedAt: Date
}
export interface UserVideoRateModel extends UserVideoRateClass, Sequelize.Model<UserVideoRateInstance, UserVideoRateAttributes> {}