]>
Commit | Line | Data |
---|---|---|
d7d5611c | 1 | import * as Bluebird from 'bluebird' |
d8465018 | 2 | import * as Sequelize from 'sequelize' |
25ed141c | 3 | import { Transaction } from 'sequelize' |
d8465018 C |
4 | import { AccountInstance } from '../account/account-interface' |
5 | import { VideoChannelInstance } from './video-channel-interface' | |
6 | ||
7 | export namespace VideoChannelShareMethods { | |
25ed141c C |
8 | export type LoadAccountsByShare = (videoChannelId: number, t: Transaction) => Bluebird<AccountInstance[]> |
9 | export type Load = (accountId: number, videoId: number, t: Transaction) => Bluebird<VideoChannelShareInstance> | |
d8465018 C |
10 | } |
11 | ||
12 | export interface VideoChannelShareClass { | |
d7d5611c | 13 | loadAccountsByShare: VideoChannelShareMethods.LoadAccountsByShare |
4e50b6a1 | 14 | load: VideoChannelShareMethods.Load |
d8465018 C |
15 | } |
16 | ||
17 | export interface VideoChannelShareAttributes { | |
18 | accountId: number | |
19 | videoChannelId: number | |
20 | } | |
21 | ||
22 | export interface VideoChannelShareInstance | |
23 | extends VideoChannelShareClass, VideoChannelShareAttributes, Sequelize.Instance<VideoChannelShareAttributes> { | |
24 | id: number | |
25 | createdAt: Date | |
26 | updatedAt: Date | |
27 | ||
28 | Account?: AccountInstance | |
29 | VideoChannel?: VideoChannelInstance | |
30 | } | |
31 | ||
32 | export interface VideoChannelShareModel | |
33 | extends VideoChannelShareClass, Sequelize.Model<VideoChannelShareInstance, VideoChannelShareAttributes> {} |