import { IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from "class-validator";
import { StockLocation } from "../../../enums/stock-location.enum";

export class StockTransferDto {
    @IsOptional()
    id?: string;

    @IsString()
    @IsNotEmpty()
    productId: string;

    @IsEnum(StockLocation, { message: "Invalid stock location" })
    from: StockLocation;

    @IsEnum(StockLocation, { message: "Invalid stock location" })
    to: StockLocation;

    @IsNumber()
    quantity: number;

    transferredAt: Date;
}
