diff options
| author | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-20 18:18:58 -0700 |
|---|---|---|
| committer | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-20 18:18:58 -0700 |
| commit | 63c02f62aa3c57f72602a9efe89dc0780d6d3079 (patch) | |
| tree | dc0a4ef57732ceb3f917b6415ea044ef02ad6f81 /server/entities | |
| parent | 674f1e04439fb1d8293f9788707093b83a1f3f1c (diff) | |
| download | locchat-63c02f62aa3c57f72602a9efe89dc0780d6d3079.tar.gz locchat-63c02f62aa3c57f72602a9efe89dc0780d6d3079.zip | |
basic login boilerplatre
Diffstat (limited to 'server/entities')
| -rw-r--r-- | server/entities/user.entity.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/entities/user.entity.ts b/server/entities/user.entity.ts index df39f3f..0bc02a7 100644 --- a/server/entities/user.entity.ts +++ b/server/entities/user.entity.ts @@ -2,15 +2,15 @@ import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export class User { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number; - @Column() - email: string; + @Column({ unique: true, nullable: false }) + email: string; - @Column() - name: string; + @Column({ nullable: false }) + name: string; - @Column() - password_hash: string; -}
\ No newline at end of file + @Column({ nullable: false }) + password_hash: string; +} |
