update cart

This commit is contained in:
2025-12-01 11:31:09 +03:30
parent 1bc3ba8cdc
commit 4093e3863e
5 changed files with 90 additions and 37 deletions
+6 -7
View File
@@ -1,16 +1,15 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsNumber, Min } from 'class-validator';
import { IsNotEmpty, IsNumber, IsString, Min } from 'class-validator';
export class AddItemToCartDto {
@ApiProperty({ description: 'Food ID' })
@IsNotEmpty()
@IsString()
foodId!: string;
@ApiProperty({ description: 'Quantity of the food item', example: 1, minimum: 1 })
@IsNotEmpty()
@IsNumber()
@Min(1)
quantity!: number;
}
@ApiProperty({ description: 'Food ID' })
@IsNotEmpty()
@IsString()
foodId!: string;
}
@@ -19,4 +19,3 @@ export class BulkAddItemsToCartDto {
@Type(() => AddItemToCartDto)
items!: AddItemToCartDto[];
}