change entity names
This commit is contained in:
@@ -3,14 +3,14 @@ import { IsNotEmpty, IsArray, ValidateNested, ArrayMinSize, IsInt, Min, IsString
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
class AddItemToCartDto {
|
||||
@ApiProperty({ description: 'Quantity of the food item', example: 1, minimum: 1 })
|
||||
@ApiProperty({ description: 'Quantity of the product item', example: 1, minimum: 1 })
|
||||
@IsNotEmpty()
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
quantity!: number;
|
||||
|
||||
@ApiProperty({ description: 'Food ID' })
|
||||
@ApiProperty({ description: 'Product ID' })
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
foodId!: string;
|
||||
@@ -21,8 +21,8 @@ export class BulkAddItemsToCartDto {
|
||||
description: 'Array of items to add to cart',
|
||||
type: [AddItemToCartDto],
|
||||
example: [
|
||||
{ foodId: 'food-123', quantity: 2 },
|
||||
{ foodId: 'food-456', quantity: 1 },
|
||||
{ foodId: 'product-123', quantity: 2 },
|
||||
{ foodId: 'product-456', quantity: 1 },
|
||||
],
|
||||
})
|
||||
@IsNotEmpty()
|
||||
|
||||
Reference in New Issue
Block a user