aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/application/application.ts
blob: 9fc07e8505c311c33667e53e7d0ab218ecf8fa3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { AllowNull, Column, Default, IsInt, Model, Table } from 'sequelize-typescript'

@Table({
  tableName: 'application'
})
export class ApplicationModel extends Model<ApplicationModel> {

  @AllowNull(false)
  @Default(0)
  @IsInt
  @Column
  migrationVersion: number

  static countTotal () {
    return ApplicationModel.count()
  }
}