]>
Commit | Line | Data |
---|---|---|
e02643f3 | 1 | import * as Sequelize from 'sequelize' |
6fcd19ba C |
2 | import * as Promise from 'bluebird' |
3 | ||
4 | import { ResultList } from '../../../shared' | |
e02643f3 | 5 | |
69818c93 | 6 | // Don't use barrel, import just what we need |
0aef76c4 | 7 | import { BlacklistedVideo as FormattedBlacklistedVideo } from '../../../shared/models/videos/video-blacklist.model' |
69818c93 | 8 | |
e02643f3 | 9 | export 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 | ||
23 | export 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 | ||
32 | export interface BlacklistedVideoAttributes { | |
0a6658fd | 33 | videoId: number |
e02643f3 C |
34 | } |
35 | ||
6fcd19ba C |
36 | export 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 |
45 | export interface BlacklistedVideoModel |
46 | extends BlacklistedVideoClass, Sequelize.Model<BlacklistedVideoInstance, BlacklistedVideoAttributes> {} |