module salon
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Length,
|
||||
Matches,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateSalonDto {
|
||||
@IsString()
|
||||
@Length(1, 200)
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@IsString()
|
||||
@Length(1, 500)
|
||||
@IsNotEmpty()
|
||||
address: string;
|
||||
|
||||
@Matches(/^09\d{9}$/)
|
||||
phone: string;
|
||||
|
||||
@IsUUID()
|
||||
ownerId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user