24 lines
475 B
TypeScript
24 lines
475 B
TypeScript
import { Entity, Column } from "typeorm";
|
|
import { AbstractEntity } from "./AbstractEntity";
|
|
|
|
@Entity({ name: "user" })
|
|
export class UserEntity extends AbstractEntity {
|
|
@Column({ nullable: false })
|
|
userName: string;
|
|
|
|
@Column({ nullable: false })
|
|
email: string;
|
|
|
|
@Column({ nullable: false })
|
|
password: string;
|
|
|
|
@Column({ nullable: true })
|
|
firstName: string;
|
|
|
|
@Column({ nullable: true })
|
|
lastName: string;
|
|
|
|
@Column({ default: "user" })
|
|
role: string;
|
|
}
|
|
|