PeerTube/server/models/video/video-share-interface.ts

29 lines
852 B
TypeScript
Raw Normal View History

2017-11-15 17:56:21 +01:00
import * as Sequelize from 'sequelize'
import { AccountInstance } from '../account/account-interface'
import { VideoInstance } from './video-interface'
2017-11-16 15:55:01 +01:00
import * as Bluebird from 'bluebird'
2017-11-15 17:56:21 +01:00
export namespace VideoShareMethods {
2017-11-16 15:55:01 +01:00
export type LoadAccountsByShare = (videoChannelId: number) => Bluebird<AccountInstance[]>
2017-11-15 17:56:21 +01:00
}
export interface VideoShareClass {
2017-11-16 15:55:01 +01:00
loadAccountsByShare: VideoShareMethods.LoadAccountsByShare
2017-11-15 17:56:21 +01:00
}
export interface VideoShareAttributes {
accountId: number
videoId: number
}
export interface VideoShareInstance extends VideoShareClass, VideoShareAttributes, Sequelize.Instance<VideoShareAttributes> {
id: number
createdAt: Date
updatedAt: Date
Account?: AccountInstance
Video?: VideoInstance
}
export interface VideoShareModel extends VideoShareClass, Sequelize.Model<VideoShareInstance, VideoShareAttributes> {}