first
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { Expose } from "class-transformer";
|
||||
import { IsInt, IsMongoId, IsNotEmpty } from "class-validator";
|
||||
|
||||
import { IsValidId } from "../../../common/decorator/validation.decorator";
|
||||
import { CommonMessage } from "../../../common/enums/message.enum";
|
||||
import { IncredibleOffersModel } from "../../product/models/IncredibleOffers.model";
|
||||
import { ProductModel } from "../../product/models/product.model";
|
||||
import { ProductVariantModel } from "../../product/models/productVariant.model";
|
||||
|
||||
export class AddIncredibleOffersParamDto {
|
||||
@Expose()
|
||||
@IsNotEmpty()
|
||||
@IsInt()
|
||||
@IsValidId(ProductModel)
|
||||
id: number;
|
||||
|
||||
@Expose()
|
||||
@IsNotEmpty()
|
||||
@IsMongoId({ message: CommonMessage.NotValidId })
|
||||
@IsValidId(ProductVariantModel)
|
||||
variantId: string;
|
||||
}
|
||||
|
||||
export class DeleteIncredibleOffersParamDto {
|
||||
@Expose()
|
||||
@IsNotEmpty()
|
||||
@IsMongoId({ message: CommonMessage.NotValidId })
|
||||
@IsValidId(IncredibleOffersModel)
|
||||
id: string;
|
||||
}
|
||||
Reference in New Issue
Block a user