aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/application-interface.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/application-interface.ts')
-rw-r--r--server/models/application-interface.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/models/application-interface.ts b/server/models/application-interface.ts
new file mode 100644
index 000000000..826d25df0
--- /dev/null
+++ b/server/models/application-interface.ts
@@ -0,0 +1,23 @@
1import * as Sequelize from 'sequelize'
2
3export namespace ApplicationMethods {
4 export type LoadMigrationVersion = (callback: (err: Error, version: number) => void) => void
5 export type UpdateMigrationVersion = (newVersion: number, transaction: any, callback: any) => void
6}
7
8export interface ApplicationClass {
9 loadMigrationVersion: ApplicationMethods.LoadMigrationVersion
10 updateMigrationVersion: ApplicationMethods.UpdateMigrationVersion
11}
12
13export interface ApplicationAttributes {
14 migrationVersion: number
15}
16
17export interface ApplicationInstance extends ApplicationClass, ApplicationAttributes, Sequelize.Instance<ApplicationAttributes> {
18 id: number
19 createdAt: Date
20 updatedAt: Date
21}
22
23export interface ApplicationModel extends ApplicationClass, Sequelize.Model<ApplicationInstance, ApplicationAttributes> {}