update order print

This commit is contained in:
2026-07-02 19:49:15 +03:30
parent 56bea20add
commit fdf06b5d88
14 changed files with 189 additions and 63 deletions
+11 -14
View File
@@ -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[];
}
+15
View File
@@ -59,6 +59,21 @@ export class FindOrdersDto {
@IsDateString()
to?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
categoryId?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
userId?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()
designerId?: string;
@ApiPropertyOptional({ default: 'createdAt' })
@IsOptional()
@IsString()
@@ -0,0 +1,13 @@
import { IsNotEmpty, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class OrderPrintValueDto {
@ApiProperty({ example: '01HXXXXXXXXXXXXXXXXXXXXX' })
@IsString()
@IsNotEmpty()
fieldId: string;
@ApiProperty({ example: 'some value' })
@IsString()
value: string;
}