]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/models/application/application.ts
Use sequelize scopes
[github/Chocobozzz/PeerTube.git] / server / models / application / application.ts
1 import { AllowNull, Column, Default, IsInt, Model, Table } from 'sequelize-typescript'
2
3 @Table({
4 tableName: 'application'
5 })
6 export class ApplicationModel extends Model<ApplicationModel> {
7
8 @AllowNull(false)
9 @Default(0)
10 @IsInt
11 @Column
12 migrationVersion: number
13
14 static countTotal () {
15 return ApplicationModel.count()
16 }
17 }