order kitem entity update
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,14 @@ export class CreateOrderItemDto {
|
||||
@ApiProperty()
|
||||
@IsArray()
|
||||
attributesValues: string[]
|
||||
|
||||
@ApiPropertyOptional({ example: 'توضیحات' })
|
||||
@IsString()
|
||||
description: string
|
||||
|
||||
@ApiPropertyOptional({ example: [] })
|
||||
@IsArray()
|
||||
attachments: { url: string, type: string }[]
|
||||
}
|
||||
|
||||
export class CreateOrderDto {
|
||||
@@ -37,14 +45,5 @@ export class CreateOrderDto {
|
||||
@ArrayMinSize(1, { message: 'At least one product is required' })
|
||||
@Type(() => CreateOrderItemDto)
|
||||
items: CreateOrderItemDto[];
|
||||
|
||||
@ApiPropertyOptional({ example: 'توضیحات' })
|
||||
@IsString()
|
||||
content: string
|
||||
|
||||
@ApiPropertyOptional({ example: [] })
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
attachments: string[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user