2017-11-16 15:55:01 +01:00
|
|
|
import * as Bluebird from 'bluebird'
|
2017-11-15 17:56:21 +01:00
|
|
|
import * as Sequelize from 'sequelize'
|
2017-11-30 11:31:15 +01:00
|
|
|
import { Transaction } from 'sequelize'
|
2017-11-15 17:56:21 +01:00
|
|
|
import { AccountInstance } from '../account/account-interface'
|
|
|
|
import { VideoChannelInstance } from './video-channel-interface'
|
|
|
|
|
|
|
|
export namespace VideoChannelShareMethods {
|
2017-11-30 11:31:15 +01:00
|
|
|
export type LoadAccountsByShare = (videoChannelId: number, t: Transaction) => Bluebird<AccountInstance[]>
|
|
|
|
export type Load = (accountId: number, videoId: number, t: Transaction) => Bluebird<VideoChannelShareInstance>
|
2017-11-15 17:56:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoChannelShareClass {
|
2017-11-16 15:55:01 +01:00
|
|
|
loadAccountsByShare: VideoChannelShareMethods.LoadAccountsByShare
|
2017-11-27 14:44:51 +01:00
|
|
|
load: VideoChannelShareMethods.Load
|
2017-11-15 17:56:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoChannelShareAttributes {
|
|
|
|
accountId: number
|
|
|
|
videoChannelId: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoChannelShareInstance
|
|
|
|
extends VideoChannelShareClass, VideoChannelShareAttributes, Sequelize.Instance<VideoChannelShareAttributes> {
|
|
|
|
id: number
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
|
|
|
|
|
|
|
Account?: AccountInstance
|
|
|
|
VideoChannel?: VideoChannelInstance
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoChannelShareModel
|
|
|
|
extends VideoChannelShareClass, Sequelize.Model<VideoChannelShareInstance, VideoChannelShareAttributes> {}
|