]>
Commit | Line | Data |
---|---|---|
4e50b6a1 | 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 { VideoInstance } from './video-interface' | |
6 | ||
7 | export namespace VideoShareMethods { | |
25ed141c C |
8 | export type LoadAccountsByShare = (videoId: number, t: Transaction) => Bluebird<AccountInstance[]> |
9 | export type Load = (accountId: number, videoId: number, t: Transaction) => Bluebird<VideoShareInstance> | |
d8465018 C |
10 | } |
11 | ||
12 | export interface VideoShareClass { | |
d7d5611c | 13 | loadAccountsByShare: VideoShareMethods.LoadAccountsByShare |
4e50b6a1 | 14 | load: VideoShareMethods.Load |
d8465018 C |
15 | } |
16 | ||
17 | export interface VideoShareAttributes { | |
18 | accountId: number | |
19 | videoId: number | |
20 | } | |
21 | ||
22 | export interface VideoShareInstance extends VideoShareClass, VideoShareAttributes, Sequelize.Instance<VideoShareAttributes> { | |
23 | id: number | |
24 | createdAt: Date | |
25 | updatedAt: Date | |
26 | ||
27 | Account?: AccountInstance | |
28 | Video?: VideoInstance | |
29 | } | |
30 | ||
31 | export interface VideoShareModel extends VideoShareClass, Sequelize.Model<VideoShareInstance, VideoShareAttributes> {} |