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