up
This commit is contained in:
@@ -3,8 +3,10 @@ import {
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsOptional,
|
||||
IsArray,
|
||||
} from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IAttachment } from '../interface/order.interface';
|
||||
|
||||
|
||||
export class CreateOrderAsAdminDto {
|
||||
@@ -36,6 +38,11 @@ export class CreateOrderAsAdminDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@ApiProperty()
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
attachments: IAttachment[];
|
||||
}
|
||||
|
||||
export class CreateOrderItemDtoAsAdmin {
|
||||
|
||||
@@ -100,7 +100,8 @@ export class OrderService {
|
||||
title: dto.title,
|
||||
status: OrderStatusEnum.CREATED,
|
||||
estimatedDays: dto.estimatedDays,
|
||||
invoiceItem
|
||||
invoiceItem,
|
||||
attachments: dto.attachments
|
||||
});
|
||||
|
||||
await this.em.persistAndFlush(order);
|
||||
|
||||
Reference in New Issue
Block a user