order kitem entity update

This commit is contained in:
2026-01-25 14:08:28 +03:30
parent a7bd26c7ca
commit bca1932ae3
5 changed files with 39 additions and 59 deletions
@@ -1,6 +1,6 @@
import {
IsString, IsOptional, IsBoolean,
IsInt, Min, IsArray, IsNumber,
IsString,
IsInt, IsArray, IsNumber,
IsNotEmpty,
ArrayMinSize,
IsMobilePhone
@@ -25,6 +25,15 @@ export class CreateOrderItemDto {
@ApiProperty()
@IsNumber()
unitPrice: number
@ApiPropertyOptional({ example: 'توضیحات' })
@IsString()
content: string
@ApiPropertyOptional({ example: [] })
@IsArray()
@IsString({ each: true })
attachments: { url: string, type: string }[]
}
export class CreateOrderAsAdminDto {
@@ -49,18 +58,5 @@ export class CreateOrderAsAdminDto {
@Type(() => CreateOrderItemDto)
items: CreateOrderItemDto[];
@ApiPropertyOptional({ example: 'توضیحات' })
@IsString()
content: string
@ApiPropertyOptional({ example: [] })
@IsArray()
@IsString({ each: true })
attachments: string[]
@ApiProperty()
@IsNumber()
discount: number
}