49 lines
879 B
TypeScript
49 lines
879 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|||
|
|
import {
|
||
|
|
IsLatitude,
|
||
|
|
IsLongitude,
|
||
|
|
IsOptional,
|
||
|
|
IsString,
|
||
|
|
IsUUID,
|
||
|
|
MaxLength,
|
||
|
|
} from 'class-validator';
|
||
|
|
|
||
|
|
export class CreateBusinessRegistrationDto {
|
||
|
|
@ApiProperty({ example: 'کارواش محمد' })
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(150)
|
||
|
|
title!: string;
|
||
|
|
|
||
|
|
@ApiProperty({ format: 'uuid' })
|
||
|
|
@IsUUID()
|
||
|
|
categoryId!: string;
|
||
|
|
|
||
|
|
@ApiPropertyOptional()
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(500)
|
||
|
|
description?: string;
|
||
|
|
|
||
|
|
@ApiPropertyOptional({ example: '09121234567' })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(20)
|
||
|
|
contactPhone?: string;
|
||
|
|
|
||
|
|
@ApiPropertyOptional()
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
@MaxLength(500)
|
||
|
|
address?: string;
|
||
|
|
|
||
|
|
@ApiPropertyOptional()
|
||
|
|
@IsOptional()
|
||
|
|
@IsLatitude()
|
||
|
|
latitude?: number;
|
||
|
|
|
||
|
|
@ApiPropertyOptional()
|
||
|
|
@IsOptional()
|
||
|
|
@IsLongitude()
|
||
|
|
longitude?: number;
|
||
|
|
}
|