Files
grow-api/src/salons/dto/create-salon.dto.ts
T
2026-07-07 19:44:31 +03:30

38 lines
483 B
TypeScript

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()
provinceId: string;
@IsUUID()
cityId: string;
@IsOptional()
@IsUUID()
ownerId?: string;
}