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

33 lines
496 B
TypeScript

import { Column, Model, Table, CreatedAt, UpdatedAt, PrimaryKey, DataType, NotEmpty, Default } from 'sequelize-typescript';
@Table({
timestamps: true,
})
export class User extends Model {
@NotEmpty
@PrimaryKey
@Default(DataType.UUIDV4)
@Column(DataType.STRING)
id: string;
@NotEmpty
@Column
name: string;
@NotEmpty
@Column
email: string;
@NotEmpty
@Column
password: string;
@CreatedAt
@Column
createdAt: Date;
@UpdatedAt
@Column
updatedAt: Date;
}