This commit is contained in:
2026-01-17 13:16:43 +03:30
parent 2ddf892793
commit 1c45abcede
11 changed files with 161 additions and 43 deletions
+29
View File
@@ -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[]
}