aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/application/application-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /server/models/application/application-interface.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip
Move models to typescript-sequelize
Diffstat (limited to 'server/models/application/application-interface.ts')
-rw-r--r--server/models/application/application-interface.ts31
1 files changed, 0 insertions, 31 deletions
diff --git a/server/models/application/application-interface.ts b/server/models/application/application-interface.ts
deleted file mode 100644
index 2c391dba3..000000000
--- a/server/models/application/application-interface.ts
+++ /dev/null
@@ -1,31 +0,0 @@
1import * as Sequelize from 'sequelize'
2import * as Bluebird from 'bluebird'
3
4export namespace ApplicationMethods {
5 export type LoadMigrationVersion = () => Bluebird<number>
6
7 export type UpdateMigrationVersion = (
8 newVersion: number,
9 transaction: Sequelize.Transaction
10 ) => Bluebird<[ number, ApplicationInstance[] ]>
11
12 export type CountTotal = () => Bluebird<number>
13}
14
15export interface ApplicationClass {
16 loadMigrationVersion: ApplicationMethods.LoadMigrationVersion
17 updateMigrationVersion: ApplicationMethods.UpdateMigrationVersion
18 countTotal: ApplicationMethods.CountTotal
19}
20
21export interface ApplicationAttributes {
22 migrationVersion: number
23}
24
25export interface ApplicationInstance extends ApplicationClass, ApplicationAttributes, Sequelize.Instance<ApplicationAttributes> {
26 id: number
27 createdAt: Date
28 updatedAt: Date
29}
30
31export interface ApplicationModel extends ApplicationClass, Sequelize.Model<ApplicationInstance, ApplicationAttributes> {}