This commit is contained in:
2025-12-06 23:51:50 +03:30
parent 7567e00f8a
commit eb48187ad0
5 changed files with 31 additions and 6 deletions
+10 -5
View File
@@ -5,28 +5,33 @@ import { Type } from 'class-transformer';
export class CreateFoodDto {
@IsNotEmpty()
@IsString()
@ApiProperty({ example: '123e4567-e89b-12d3-a456-426614174000' })
@ApiProperty()
categoryId: string;
@IsOptional()
@IsBoolean()
@ApiPropertyOptional({ example: false })
@Type(() => Boolean)
breakfast?: boolean;
@IsOptional()
@IsBoolean()
@ApiPropertyOptional({ example: false })
@Type(() => Boolean)
tue?: boolean;
@IsOptional()
@IsBoolean()
@ApiPropertyOptional({ example: false })
@Type(() => Boolean)
wed?: boolean;
@IsOptional()
@IsBoolean()
@ApiPropertyOptional({ example: false })
@Type(() => Boolean)
thu?: boolean;
@IsOptional()
@IsBoolean()
@ApiPropertyOptional({ example: false })
@@ -140,8 +145,8 @@ export class CreateFoodDto {
discount?: number;
@IsOptional()
@IsArray()
@IsString({ each: true })
@ApiPropertyOptional({ type: [String] })
categoryIds?: string[];
@IsBoolean()
@ApiPropertyOptional({ example: false })
@Type(() => Boolean)
isSpecialOffer?: boolean;
}