This commit is contained in:
2025-11-23 00:02:26 +03:30
parent cd4dc69aef
commit c8b0ee3c56
6 changed files with 373 additions and 345 deletions
+16
View File
@@ -0,0 +1,16 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsNumber, 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;
}
+10
View File
@@ -0,0 +1,10 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';
export class ApplyCouponDto {
@ApiProperty({ description: 'Coupon code', example: 'DISCOUNT10' })
@IsNotEmpty()
@IsString()
code!: string;
}
+11
View File
@@ -0,0 +1,11 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, Min } from 'class-validator';
export class UpdateItemQuantityDto {
@ApiProperty({ description: 'Quantity of the food item', example: 2, minimum: 1 })
@IsNotEmpty()
@IsNumber()
@Min(1)
quantity!: number;
}