aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/models/video/author-interface.ts
blob: dbcb85b17d2ce45e78833f3621a2e580c9a8f8bc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                                      
                                   
 
                                    
 
                                





                                      













                                                                                                             


                  


                                                                                                      
import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'

import { PodInstance } from '../pod'

export namespace AuthorMethods {
  export type FindOrCreateAuthor = (
    name: string,
    podId: number,
    userId: number,
    transaction: Sequelize.Transaction
  ) => Promise<AuthorInstance>
}

export interface AuthorClass {
  findOrCreateAuthor: AuthorMethods.FindOrCreateAuthor
}

export interface AuthorAttributes {
  name: string
}

export interface AuthorInstance extends AuthorClass, AuthorAttributes, Sequelize.Instance<AuthorAttributes> {
  id: number
  createdAt: Date
  updatedAt: Date

  podId: number
  Pod: PodInstance
}

export interface AuthorModel extends AuthorClass, Sequelize.Model<AuthorInstance, AuthorAttributes> {}