landing desktop1
This commit is contained in:
@@ -1,7 +1,112 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
IsLatitude,
|
||||
IsLongitude,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Matches,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
|
||||
export class UpdateBusinessDto {
|
||||
@ApiPropertyOptional({ example: 'Shine Carwash' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
title?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'shine-carwash' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(120)
|
||||
@Matches(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, {
|
||||
message: 'slug must be lowercase words separated by hyphens',
|
||||
})
|
||||
slug?: string;
|
||||
|
||||
@ApiPropertyOptional({ format: 'uuid' })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
categoryId?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'تمیزی که میدرخشد', nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
subtitle?: string | null;
|
||||
subtitle?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Premium carwash service', nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(500)
|
||||
description?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: '09123456789', nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(20)
|
||||
contactPhone?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Main street', nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(500)
|
||||
address?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: 35.6892, nullable: true })
|
||||
@IsOptional()
|
||||
@IsLatitude()
|
||||
latitude?: number | null;
|
||||
|
||||
@ApiPropertyOptional({ example: 51.389, nullable: true })
|
||||
@IsOptional()
|
||||
@IsLongitude()
|
||||
longitude?: number | null;
|
||||
|
||||
@ApiPropertyOptional({ format: 'uuid', nullable: true })
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
ownerId?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: true })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
isActive?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: false,
|
||||
description: 'When true, services are priced per owner-defined class (e.g. car size)',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
serviceClassesEnabled?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 1,
|
||||
description: 'How many customers can be served at the same time',
|
||||
minimum: 1,
|
||||
maximum: 20,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(20)
|
||||
concurrentCapacity?: number;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 30,
|
||||
description: 'Minutes between available booking slot start times',
|
||||
minimum: 5,
|
||||
maximum: 120,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(5)
|
||||
@Max(120)
|
||||
slotStepMinutes?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user