Created
August 19, 2018 10:48
-
-
Save kerren/3ccd84bb0e701d4b8ea205de59ca3a23 to your computer and use it in GitHub Desktop.
The user entity for Nest.js - https://blog.entrostat.com/setting-up-a-database-module-in-nest-js/
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 { 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