blob: 2c391dba34f4297e7b4e32c680674a45a3241256 (
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
24
25
26
27
28
29
30
31
|
import * as Sequelize from 'sequelize'
import * as Bluebird from 'bluebird'
export namespace ApplicationMethods {
export type LoadMigrationVersion = () => Bluebird<number>
export type UpdateMigrationVersion = (
newVersion: number,
transaction: Sequelize.Transaction
) => Bluebird<[ number, ApplicationInstance[] ]>
export type CountTotal = () => Bluebird<number>
}
export interface ApplicationClass {
loadMigrationVersion: ApplicationMethods.LoadMigrationVersion
updateMigrationVersion: ApplicationMethods.UpdateMigrationVersion
countTotal: ApplicationMethods.CountTotal
}
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> {}
|