Skip to content

Instantly share code, notes, and snippets.

@birendra-b
Created June 29, 2020 16:48
Show Gist options
  • Save birendra-b/6ac3f90ba26c7039554c98a35b70068e to your computer and use it in GitHub Desktop.
Save birendra-b/6ac3f90ba26c7039554c98a35b70068e to your computer and use it in GitHub Desktop.
src/entities/User.ts
import {Entity, PrimaryGeneratedColumn, Column} from "typeorm";
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column()
firstName: string;
@Column()
lastName: string;
@Column()
age: number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment