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.
 

30 lines
507 B

import { Table, Column, Model, DataType } from 'sequelize-typescript';
@Table
export class User extends Model<User> {
@Column({
type: DataType.STRING,
allowNull: false,
})
name: string;
@Column({
type: DataType.STRING,
unique: true,
allowNull: false,
})
email: string;
@Column({
type: DataType.STRING,
allowNull: false,
})
password: string;
@Column({
type: DataType.ENUM,
values: ['male', 'female'],
allowNull: false,
})
gender: string;
}