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.

26 lines
423 B
TypeScript

import {Table, Column, Model, PrimaryKey, CreatedAt, UpdatedAt} from 'sequelize-typescript';
@Table
export class User extends Model<User> {
@PrimaryKey
@Column
public email!: string;
@Column
public passwordHash!: string;
@Column
@CreatedAt
public createdAt: Date = new Date();
@Column
@UpdatedAt
public updatedAt: Date = new Date();
short() {
return {
email: this.email,
};
}
}