order print
This commit is contained in:
@@ -43,16 +43,7 @@ export class CreateOrderAsAdminDto {
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
attachments: IAttachment[];
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class CreateOrderItemDtoAsAdmin {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
productId: string;
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
quantity?: number;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
import { ApiProperty, ApiPropertyOptional, PartialType } from '@nestjs/swagger';
|
||||
import { CreateOrderAsAdminDto, CreateOrderItemDtoAsAdmin } from './create-order.dto';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
import { PartialType } from '@nestjs/swagger';
|
||||
import { CreateOrderAsAdminDto } from './create-order.dto';
|
||||
|
||||
|
||||
export class UpdateOrCreateOrderItem extends CreateOrderItemDtoAsAdmin {
|
||||
@ApiProperty()
|
||||
@IsString()
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class UpdateOrderAsAdminDto extends PartialType(CreateOrderAsAdminDto) {
|
||||
@ApiPropertyOptional({ type: [UpdateOrCreateOrderItem] })
|
||||
@IsOptional()
|
||||
items?: UpdateOrCreateOrderItem[];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user