Created
February 19, 2019 15:29
-
-
Save saurabhpati/65c89d9a0d8bb3abee34853b840eba70 to your computer and use it in GitHub Desktop.
User Entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PrimaryGeneratedColumn, Column, Entity, OneToMany, ManyToMany } from 'typeorm'; | |
@Entity() | |
export class User { | |
@PrimaryGeneratedColumn() | |
id: number; | |
@Column({ length: 128 }) | |
firstName: string; | |
@Column({ length: 128 }) | |
lastName: string; | |
@Column({ length: 128 }) | |
email: string; | |
@Column({ length: 64 }) | |
username: string; | |
@Column({ length: 64 }) | |
password: string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment