aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/author-interface.ts
blob: d2475c3bde981ebf7f8a4faaf5faeaeee8ae0761 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as Sequelize from 'sequelize'

export namespace AuthorMethods {
  export type FindOrCreateAuthor = (name, podId, userId, transaction, callback) => 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
}

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