Skip to content

Instantly share code, notes, and snippets.

@SergeyMell
Created July 30, 2020 21:35
Show Gist options
  • Save SergeyMell/1b635b61a56f2e9f294292724d567621 to your computer and use it in GitHub Desktop.
Save SergeyMell/1b635b61a56f2e9f294292724d567621 to your computer and use it in GitHub Desktop.
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