aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/models/video/author-interface.ts
blob: c1b30848ca9c44111f957249470a944b3cd3d787 (plain) (tree)
1
2
3
4
5
6
7

                                      
                                    
 
                                

                                                                                                                                                                  













                                                                                                             


                  


                                                                                                      
import * as Sequelize from 'sequelize'

import { PodInstance } from '../pod'

export namespace AuthorMethods {
  export type FindOrCreateAuthorCallback = (err: Error, authorInstance?: AuthorInstance) => void
  export type FindOrCreateAuthor = (name: string, podId: number, userId: number, transaction: Sequelize.Transaction, callback: FindOrCreateAuthorCallback) => void
}

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> {}