Files
dkala-api/src/modules/orders/dto/update-order-item-quantity.dto.ts
T
2026-06-28 12:58:05 +03:30

17 lines
457 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, Min } from 'class-validator';
import { Type } from 'class-transformer';
export class UpdateOrderItemQuantityDto {
@ApiProperty({
description: 'New quantity for the order item (supports decimals for variable products)',
example: 2,
minimum: 0.001,
})
@IsNotEmpty()
@Type(() => Number)
@IsNumber({ maxDecimalPlaces: 3 })
@Min(0.001)
quantity!: number;
}