]>
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 |
4771e000 | 7 | import { BlacklistedVideo as FormatedBlacklistedVideo } from '../../../shared/models/videos/video-blacklist.model' |
69818c93 | 8 | |
e02643f3 | 9 | export namespace BlacklistedVideoMethods { |
70c065d6 | 10 | export type ToFormatedJSON = (this: BlacklistedVideoInstance) => FormatedBlacklistedVideo |
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 | |
6fcd19ba | 20 | export type LoadByVideoId = (id: string) => Promise<BlacklistedVideoInstance> |
e02643f3 C |
21 | } |
22 | ||
23 | export interface BlacklistedVideoClass { | |
24 | toFormatedJSON: BlacklistedVideoMethods.ToFormatedJSON | |
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 { | |
70c065d6 | 33 | videoId: string |
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 C |
41 | |
42 | toFormatedJSON: BlacklistedVideoMethods.ToFormatedJSON | |
e02643f3 C |
43 | } |
44 | ||
6fcd19ba C |
45 | export interface BlacklistedVideoModel |
46 | extends BlacklistedVideoClass, Sequelize.Model<BlacklistedVideoInstance, BlacklistedVideoAttributes> {} |