🚧 User.ts - optional phone number
This commit is contained in:
parent
9395813f5a
commit
8d1dd78194
@ -1,5 +1,5 @@
|
|||||||
import { Entity, Column, OneToMany, ManyToOne, PrimaryGeneratedColumn, Generated, Unique, JoinTable, ManyToMany } from "typeorm";
|
import { Entity, Column, OneToMany, ManyToOne, PrimaryGeneratedColumn, Generated, Unique, JoinTable, ManyToMany } from "typeorm";
|
||||||
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsString, isUUID, } from "class-validator";
|
import { IsBoolean, IsEmail, IsInt, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, isUUID, } from "class-validator";
|
||||||
import { UserGroup } from './UserGroup';
|
import { UserGroup } from './UserGroup';
|
||||||
import { Permission } from './Permission';
|
import { Permission } from './Permission';
|
||||||
import { UserAction } from './UserAction';
|
import { UserAction } from './UserAction';
|
||||||
@ -31,6 +31,13 @@ export class User {
|
|||||||
@IsEmail()
|
@IsEmail()
|
||||||
email: string;
|
email: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user phone
|
||||||
|
*/
|
||||||
|
@IsPhoneNumber("ZZ")
|
||||||
|
@IsOptional()
|
||||||
|
phone: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* username
|
* username
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user