create database structure
This commit is contained in:
parent
e5b5d7e67d
commit
ad6ee64565
15 changed files with 483 additions and 14 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { Entity, Column } from "typeorm";
|
||||
import { AbstractEntity } from "./AbstractEntity.js";
|
||||
|
||||
// @todo Add migration to update table
|
||||
@Entity({ name: "user" })
|
||||
export class UserEntity extends AbstractEntity {
|
||||
@Column({ nullable: false })
|
||||
@Column({ nullable: false, name: "user_name" })
|
||||
userName!: string;
|
||||
|
||||
@Column({ nullable: false })
|
||||
|
|
@ -12,10 +13,10 @@ export class UserEntity extends AbstractEntity {
|
|||
@Column({ nullable: false })
|
||||
password!: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ nullable: true, name: "first_name"})
|
||||
firstName?: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@Column({ nullable: true, name: "last_name"})
|
||||
lastName?: string;
|
||||
|
||||
@Column({ default: "user" })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue