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