Cleanup models
[oweals/peertube.git] / server / models / video / video-channel-share-interface.ts
1 import * as Bluebird from 'bluebird'
2 import * as Sequelize from 'sequelize'
3 import { AccountInstance } from '../account/account-interface'
4 import { VideoChannelInstance } from './video-channel-interface'
5
6 export namespace VideoChannelShareMethods {
7   export type LoadAccountsByShare = (videoChannelId: number) => Bluebird<AccountInstance[]>
8 }
9
10 export interface VideoChannelShareClass {
11   loadAccountsByShare: VideoChannelShareMethods.LoadAccountsByShare
12 }
13
14 export interface VideoChannelShareAttributes {
15   accountId: number
16   videoChannelId: number
17 }
18
19 export interface VideoChannelShareInstance
20   extends VideoChannelShareClass, VideoChannelShareAttributes, Sequelize.Instance<VideoChannelShareAttributes> {
21   id: number
22   createdAt: Date
23   updatedAt: Date
24
25   Account?: AccountInstance
26   VideoChannel?: VideoChannelInstance
27 }
28
29 export interface VideoChannelShareModel
30   extends VideoChannelShareClass, Sequelize.Model<VideoChannelShareInstance, VideoChannelShareAttributes> {}