cart
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user