pl4y-data-library
Version:
This library contains the dtos, enums, schemas, and other data objects needed in the pl4y ecosystem.
24 lines (18 loc) • 613 B
text/typescript
import { IsDate, IsEnum, IsNotEmpty, IsOptional, IsString } from "class-validator";
import { Type } from "class-transformer";
import { ProductStatus } from "../../../enums/product-status.enum";
export class ValidityDTO {
()
id?: string;
()
()
productId: string;
(() => Date)
({ message: "startDate must be a valid ISO date" })
startDate: Date;
(() => Date)
({ message: "endDate must be a valid ISO date" })
endDate: Date;
(ProductStatus, { message: "Invalid status" })
status: ProductStatus;
}