]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/video/author-interface.ts
Move to promises
[github/Chocobozzz/PeerTube.git] / server / models / video / author-interface.ts
CommitLineData
e02643f3 1import * as Sequelize from 'sequelize'
6fcd19ba 2import * as Promise from 'bluebird'
e02643f3 3
74889a71 4import { PodInstance } from '../pod'
69818c93 5
e02643f3 6export namespace AuthorMethods {
6fcd19ba
C
7 export type FindOrCreateAuthor = (
8 name: string,
9 podId: number,
10 userId: number,
11 transaction: Sequelize.Transaction
12 ) => Promise<AuthorInstance>
e02643f3
C
13}
14
15export interface AuthorClass {
16 findOrCreateAuthor: AuthorMethods.FindOrCreateAuthor
17}
18
19export interface AuthorAttributes {
20 name: string
21}
22
23export interface AuthorInstance extends AuthorClass, AuthorAttributes, Sequelize.Instance<AuthorAttributes> {
24 id: number
25 createdAt: Date
26 updatedAt: Date
69818c93
C
27
28 podId: number
29 Pod: PodInstance
e02643f3
C
30}
31
32export interface AuthorModel extends AuthorClass, Sequelize.Model<AuthorInstance, AuthorAttributes> {}