aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel-share-interface.ts
blob: bcb3a0e246db48aa6683bd4a2aa359d140da8e61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import * as Bluebird from 'bluebird'
import * as Sequelize from 'sequelize'
import { AccountInstance } from '../account/account-interface'
import { VideoChannelInstance } from './video-channel-interface'

export namespace VideoChannelShareMethods {
  export type LoadAccountsByShare = (videoChannelId: number) => Bluebird<AccountInstance[]>
  export type Load = (accountId: number, videoId: number) => Bluebird<VideoChannelShareInstance>
}

export interface VideoChannelShareClass {
  loadAccountsByShare: VideoChannelShareMethods.LoadAccountsByShare
  load: VideoChannelShareMethods.Load
}

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> {}