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

export namespace ApplicationMethods {
  export type LoadMigrationVersion = (callback: (err: Error, version: number) => void) => void
  export type UpdateMigrationVersion = (newVersion: number, transaction: any, callback: any) => void
}

export interface ApplicationClass {
  loadMigrationVersion: ApplicationMethods.LoadMigrationVersion
  updateMigrationVersion: ApplicationMethods.UpdateMigrationVersion
}

export interface ApplicationAttributes {
  migrationVersion: number
}

export interface ApplicationInstance extends ApplicationClass, ApplicationAttributes, Sequelize.Instance<ApplicationAttributes> {
  id: number
  createdAt: Date
  updatedAt: Date
}

export interface ApplicationModel extends ApplicationClass, Sequelize.Model<ApplicationInstance, ApplicationAttributes> {}