students.ts 518 Bytes
Newer Older
chinguyen's avatar
chinguyen committed
1
import { Model, STRING, UUID, Deferrable, NUMBER, DATE, INTEGER, BIGINT } from 'sequelize'
chinguyen's avatar
chinguyen committed
2 3 4 5 6 7 8 9
import sequelize from './_index'

export class Students extends Model {

}

export class StudentsModel {
    id: string
chinguyen's avatar
chinguyen committed
10
    code: string
chinguyen's avatar
chinguyen committed
11 12 13
    firstname: string
    lastname: string
    email: string
chinguyen's avatar
chinguyen committed
14 15 16
    sdt: string
    createdAt: Date
    updatedAt: Date
chinguyen's avatar
chinguyen committed
17 18
  }
  Students.init({
chinguyen's avatar
chinguyen committed
19 20 21 22 23
    code: STRING,
    firstname: STRING,
    lastname: STRING,
    email: STRING,
    sdt: STRING
chinguyen's avatar
chinguyen committed
24 25 26 27
  }, {
    sequelize,
    modelName: 'Students',
  })