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

31 lines
966 B
TypeScript
Raw Normal View History

import * as Bluebird from 'bluebird'
2017-11-15 16:56:21 +00:00
import * as Sequelize from 'sequelize'
import { AccountInstance } from '../account/account-interface'
import { VideoInstance } from './video-interface'
export namespace VideoShareMethods {
export type LoadAccountsByShare = (videoId: number) => Bluebird<AccountInstance[]>
export type Load = (accountId: number, videoId: number) => Bluebird<VideoShareInstance>
2017-11-15 16:56:21 +00:00
}
export interface VideoShareClass {
2017-11-16 14:55:01 +00:00
loadAccountsByShare: VideoShareMethods.LoadAccountsByShare
load: VideoShareMethods.Load
2017-11-15 16:56:21 +00: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> {}