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