You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
668 B

import { Column, Table, Model, DataType } from "sequelize-typescript";
@Table
export class Admin extends Model<Admin> {
@Column({ unique: true })
email: string;
@Column
password: string;
@Column({ defaultValue: "admin" })
role: string;
@Column
firstName: string;
@Column
lastName: string;
@Column({ unique: true })
username: string;
@Column({ unique: true })
phoneNumber: string;
@Column({
type: DataType.STRING,
allowNull: true,
})
refreshToken: string;
@Column({
type: DataType.ENUM("male", "female"),
allowNull: false,
})
gender: string;
}
export enum Gender {
Male = "male",
Female = "female",
}