🚧 User entity - add @Column

ref #11
This commit is contained in:
Philipp Dormann 2020-12-04 22:48:42 +01:00
parent 48484f04c9
commit 7f3358d284
1 changed files with 10 additions and 0 deletions

View File

@ -20,18 +20,21 @@ export class User {
/**
* uuid
*/
@Column()
@IsUUID("4")
uuid: string;
/**
* user email
*/
@Column()
@IsEmail()
email: string;
/**
* user phone
*/
@Column()
@IsPhoneNumber("ZZ")
@IsOptional()
phone: string;
@ -39,12 +42,14 @@ export class User {
/**
* username
*/
@Column()
@IsString()
username: string;
/**
* firstname
*/
@Column()
@IsString()
@IsNotEmpty()
firstname: string;
@ -52,6 +57,7 @@ export class User {
/**
* middlename
*/
@Column()
@IsString()
@IsOptional()
middlename: string;
@ -59,6 +65,7 @@ export class User {
/**
* lastname
*/
@Column()
@IsString()
@IsNotEmpty()
lastname: string;
@ -66,6 +73,7 @@ export class User {
/**
* password
*/
@Column()
@IsString()
@IsNotEmpty()
password: string;
@ -86,6 +94,7 @@ export class User {
/**
* is user enabled?
*/
@Column()
@IsBoolean()
enabled: boolean;
@ -99,6 +108,7 @@ export class User {
/**
* profilepic
*/
@Column()
@IsString()
profilepic: string;