order
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { IsString, IsOptional, IsBoolean, IsInt, Min, IsArray, IsNumber } from 'class-validator';
|
||||
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class CreateOrderDto {
|
||||
@IsArray()
|
||||
@ApiProperty({ isArray: true })
|
||||
items: CreateOrderItemDto[];
|
||||
|
||||
@IsString()
|
||||
content: string
|
||||
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
attachments: string[]
|
||||
}
|
||||
|
||||
export class CreateOrderItemDto {
|
||||
|
||||
@IsInt()
|
||||
@ApiProperty()
|
||||
productId: bigint;
|
||||
|
||||
@ApiProperty()
|
||||
quantity: number
|
||||
|
||||
@IsArray()
|
||||
attributesValues: string[]
|
||||
}
|
||||
Reference in New Issue
Block a user