17 lines
459 B
TypeScript
17 lines
459 B
TypeScript
import { IsArray, ValidateNested } from 'class-validator';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { OrderPrintValueDto } from './order-print-value.dto';
|
|
|
|
export class CreateOrderPrintDto {
|
|
@ApiProperty({
|
|
type: [OrderPrintValueDto],
|
|
example: [{ fieldId: '', value: '' }],
|
|
})
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => OrderPrintValueDto)
|
|
fields: OrderPrintValueDto[];
|
|
}
|
|
|