UNPKG

pl4y-data-library

Version:

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

16 lines (12 loc) 422 B
import { IsEnum, IsNotEmpty, IsNumber, Min } from "class-validator"; import { StockLocation } from "../../../enums/stock-location.enum"; export class TransferStockDto { @IsNotEmpty() @IsNumber() @Min(0) quantity: number; @IsEnum(StockLocation, { message: "invalid stock location" }) from: StockLocation; @IsEnum(StockLocation, { message: "invalid stock location" }) to: StockLocation; }