Skip to content

Instantly share code, notes, and snippets.

@kerren
Created August 19, 2018 10:48
Show Gist options
  • Save kerren/3ccd84bb0e701d4b8ea205de59ca3a23 to your computer and use it in GitHub Desktop.
Save kerren/3ccd84bb0e701d4b8ea205de59ca3a23 to your computer and use it in GitHub Desktop.
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ length: 255 })
name: string;
@Column({ length: 255 })
email: string;
@Column({ length: 255 })
password: string;
@Column({ type: 'jsonb' })
details: any;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment