Created
July 30, 2020 21:35
-
-
Save SergeyMell/1b635b61a56f2e9f294292724d567621 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; | |
@Entity() | |
export class User extends BaseEntity { | |
@PrimaryGeneratedColumn() | |
id: number; | |
@Column({ unique: true }) | |
email: string; | |
@Column() | |
firstName: string; | |
@Column() | |
lastName: string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment