LocChat/server/entities/user.entity.ts

17 lines
309 B
TypeScript
Raw Normal View History

2021-11-16 21:14:46 -05:00
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class User {
2021-11-20 20:18:58 -05:00
@PrimaryGeneratedColumn()
id: number;
2021-11-16 21:14:46 -05:00
2021-11-20 20:18:58 -05:00
@Column({ unique: true, nullable: false })
email: string;
2021-11-16 21:14:46 -05:00
2021-11-20 20:18:58 -05:00
@Column({ nullable: false })
name: string;
2021-11-16 21:14:46 -05:00
2021-11-20 20:18:58 -05:00
@Column({ nullable: false })
password_hash: string;
}