]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/models/video/video-channel-share-interface.ts
0482e82971f78b209721b298f494c658ef8101ff
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel-share-interface.ts
1 import * as Bluebird from 'bluebird'
2 import * as Sequelize from 'sequelize'
3 import { Transaction } from 'sequelize'
4 import { AccountInstance } from '../account/account-interface'
5 import { VideoChannelInstance } from './video-channel-interface'
6
7 export namespace VideoChannelShareMethods {
8 export type LoadAccountsByShare = (videoChannelId: number, t: Transaction) => Bluebird<AccountInstance[]>
9 export type Load = (accountId: number, videoId: number, t: Transaction) => Bluebird<VideoChannelShareInstance>
10 }
11
12 export interface VideoChannelShareClass {
13 loadAccountsByShare: VideoChannelShareMethods.LoadAccountsByShare
14 load: VideoChannelShareMethods.Load
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> {}