2017-11-27 07:44:51 -06:00
|
|
|
import * as Bluebird from 'bluebird'
|
2017-11-15 10:56:21 -06:00
|
|
|
import * as Sequelize from 'sequelize'
|
|
|
|
import { AccountInstance } from '../account/account-interface'
|
|
|
|
import { VideoInstance } from './video-interface'
|
|
|
|
|
|
|
|
export namespace VideoShareMethods {
|
2017-11-30 06:16:23 -06:00
|
|
|
export type LoadAccountsByShare = (videoId: number, t: Sequelize.Transaction) => Bluebird<AccountInstance[]>
|
|
|
|
export type Load = (accountId: number, videoId: number, t: Sequelize.Transaction) => Bluebird<VideoShareInstance>
|
2017-11-15 10:56:21 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoShareClass {
|
2017-11-16 08:55:01 -06:00
|
|
|
loadAccountsByShare: VideoShareMethods.LoadAccountsByShare
|
2017-11-27 07:44:51 -06:00
|
|
|
load: VideoShareMethods.Load
|
2017-11-15 10:56:21 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoShareAttributes {
|
|
|
|
accountId: number
|
|
|
|
videoId: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoShareInstance extends VideoShareClass, VideoShareAttributes, Sequelize.Instance<VideoShareAttributes> {
|
|
|
|
id: number
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
|
|
|
|
|
|
|
Account?: AccountInstance
|
|
|
|
Video?: VideoInstance
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoShareModel extends VideoShareClass, Sequelize.Model<VideoShareInstance, VideoShareAttributes> {}
|