]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/video/video-blacklist-interface.ts
Fix login when there is an error
[github/Chocobozzz/PeerTube.git] / server / models / video / video-blacklist-interface.ts
CommitLineData
e02643f3 1import * as Sequelize from 'sequelize'
6fcd19ba
C
2import * as Promise from 'bluebird'
3
4import { ResultList } from '../../../shared'
e02643f3 5
69818c93 6// Don't use barrel, import just what we need
0aef76c4 7import { BlacklistedVideo as FormattedBlacklistedVideo } from '../../../shared/models/videos/video-blacklist.model'
69818c93 8
e02643f3 9export namespace BlacklistedVideoMethods {
0aef76c4 10 export type ToFormattedJSON = (this: BlacklistedVideoInstance) => FormattedBlacklistedVideo
69818c93 11
6fcd19ba 12 export type CountTotal = () => Promise<number>
69818c93 13
6fcd19ba 14 export type List = () => Promise<BlacklistedVideoInstance[]>
69818c93 15
6fcd19ba 16 export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<BlacklistedVideoInstance> >
69818c93 17
6fcd19ba 18 export type LoadById = (id: number) => Promise<BlacklistedVideoInstance>
e02643f3 19
0a6658fd 20 export type LoadByVideoId = (id: number) => Promise<BlacklistedVideoInstance>
e02643f3
C
21}
22
23export interface BlacklistedVideoClass {
0aef76c4 24 toFormattedJSON: BlacklistedVideoMethods.ToFormattedJSON
e02643f3
C
25 countTotal: BlacklistedVideoMethods.CountTotal
26 list: BlacklistedVideoMethods.List
27 listForApi: BlacklistedVideoMethods.ListForApi
28 loadById: BlacklistedVideoMethods.LoadById
29 loadByVideoId: BlacklistedVideoMethods.LoadByVideoId
30}
31
32export interface BlacklistedVideoAttributes {
0a6658fd 33 videoId: number
e02643f3
C
34}
35
6fcd19ba
C
36export interface BlacklistedVideoInstance
37 extends BlacklistedVideoClass, BlacklistedVideoAttributes, Sequelize.Instance<BlacklistedVideoAttributes> {
e02643f3
C
38 id: number
39 createdAt: Date
40 updatedAt: Date
154898b0 41
0aef76c4 42 toFormattedJSON: BlacklistedVideoMethods.ToFormattedJSON
e02643f3
C
43}
44
6fcd19ba
C
45export interface BlacklistedVideoModel
46 extends BlacklistedVideoClass, Sequelize.Model<BlacklistedVideoInstance, BlacklistedVideoAttributes> {}