Trần Viết Sơn
feat: update order
95a812a
raw
history blame contribute delete
557 Bytes
import {
IsArray,
IsEnum,
IsNumber,
IsObject,
IsOptional,
IsString,
ValidateNested,
} from 'class-validator';
import { OrderType } from '../../../common/enums/OrderType.enum.js';
import { OrderItemsDto } from './order-items.dto.js';
import { Type } from 'class-transformer';
export class CreateOrderDto {
@IsOptional()
@IsNumber()
table_number?: number;
@IsOptional()
@IsString()
note?: string;
@IsNumber()
order_type: number;
@IsArray()
@ValidateNested()
@Type(() => OrderItemsDto)
order_items: OrderItemsDto[];
}