order update refactor

This commit is contained in:
2026-02-01 15:34:06 +03:30
parent 918d774cad
commit 71319de649
12 changed files with 129 additions and 31 deletions
+12 -3
View File
@@ -1,5 +1,14 @@
import { OmitType, PartialType } from '@nestjs/swagger';
import { CreateOrderAsAdminDto } from './create-order.dto';
import { ApiProperty, OmitType, PartialType } from '@nestjs/swagger';
import { CreateOrderAsAdminDto, CreateOrderItemDtoAsAdmin } from './create-order.dto';
import { IsNumber } from 'class-validator';
export class UpdateOrderAsAdminDto extends PartialType(OmitType(CreateOrderAsAdminDto, 'items' as any)) { }
export class UpdateOrderAsAdminDto extends PartialType(OmitType(CreateOrderAsAdminDto, 'items' as any)) {
@ApiProperty()
items: UpdateOrCreateOrderItem[]
}
export class UpdateOrCreateOrderItem extends CreateOrderItemDtoAsAdmin {
@ApiProperty()
@IsNumber()
id: number
}