update order print
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
import {
|
||||
IsArray,
|
||||
} from 'class-validator';
|
||||
import { IsArray, ValidateNested } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IField } from 'src/modules/request/interface/request.interface';
|
||||
|
||||
import { Type } from 'class-transformer';
|
||||
import { OrderPrintValueDto } from './order-print-value.dto';
|
||||
|
||||
export class CreateOrderPrintDto {
|
||||
|
||||
@ApiProperty({
|
||||
example: [
|
||||
{ fieldId: '', value: '' }
|
||||
]
|
||||
})
|
||||
@IsArray()
|
||||
fields: IField[];
|
||||
|
||||
@ApiProperty({
|
||||
type: [OrderPrintValueDto],
|
||||
example: [{ fieldId: '', value: '' }],
|
||||
})
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => OrderPrintValueDto)
|
||||
fields: OrderPrintValueDto[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user