]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/video/video-share-interface.ts
Fix lint
[github/Chocobozzz/PeerTube.git] / server / models / video / video-share-interface.ts
CommitLineData
4e50b6a1 1import * as Bluebird from 'bluebird'
d8465018
C
2import * as Sequelize from 'sequelize'
3import { AccountInstance } from '../account/account-interface'
4import { VideoInstance } from './video-interface'
5
6export namespace VideoShareMethods {
98ec8b8e
C
7 export type LoadAccountsByShare = (videoId: number, t: Sequelize.Transaction) => Bluebird<AccountInstance[]>
8 export type Load = (accountId: number, videoId: number, t: Sequelize.Transaction) => Bluebird<VideoShareInstance>
d8465018
C
9}
10
11export interface VideoShareClass {
d7d5611c 12 loadAccountsByShare: VideoShareMethods.LoadAccountsByShare
4e50b6a1 13 load: VideoShareMethods.Load
d8465018
C
14}
15
16export interface VideoShareAttributes {
17 accountId: number
18 videoId: number
19}
20
21export interface VideoShareInstance extends VideoShareClass, VideoShareAttributes, Sequelize.Instance<VideoShareAttributes> {
22 id: number
23 createdAt: Date
24 updatedAt: Date
25
26 Account?: AccountInstance
27 Video?: VideoInstance
28}
29
30export interface VideoShareModel extends VideoShareClass, Sequelize.Model<VideoShareInstance, VideoShareAttributes> {}