UNPKG

pl4y-data-library

Version:

This library contains the dtos, enums, schemas, and other data objects needed in the pl4y ecosystem.

13 lines (10 loc) 334 B
import { IsEnum, IsNotEmpty, IsNumber, Min } from "class-validator"; import { StockLocation } from "../../../enums/stock-location.enum"; export class UpdateStockDto { @IsNotEmpty() @IsNumber() @Min(0) quantity: number; @IsEnum(StockLocation, { message: "invalid stock location" }) location: StockLocation; }