package com.cf.imes.module.system.controller.admin.funds.productpromotion.vo;

import com.cf.imes.module.system.validation.products.DurationUnitValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 优惠活动表 新增/修改 Request VO")
@Data
public class ProductPromotionSaveReqVO {

    @Schema(description = "活动id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotNull(message = "{product.promotion.save.activityName.notNull}")
    private String activityName;

    @Schema(description = "购买时长",example = "1")
    @NotNull(message = "{product.promotion.save.purchase.duration.notNull}")
    private Integer purchaseDuration;

    @Schema(description = "产品ID", example = "1")
    @NotNull(message = "{product.promotion.save.productId.notNull}")
    private Long productId;

    @Schema(description = "购买时长单位，0：年、1：月、2：日",example = "1")
    @DurationUnitValid
    @NotNull(message = "{product.promotion.save.purchase.duration.unit.notNull}")
    private Integer purchaseDurationUnit;

    @Schema(description = "赠送时长",example = "1")
    @NotNull(message = "{product.promotion.save.gift.duration.notNull}")
    private Integer giftDuration;

    @Schema(description = "赠送时长单位",example = "1")
    @DurationUnitValid
    @NotNull(message = "{product.promotion.save.gift.duration.unit.notNull}")
    private Integer giftDurationUnit;

    @Schema(description = "开始时间")
    @NotNull(message = "{product.promotion.save.startTime.notNull}")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @NotNull(message = "{product.promotion.save.endTime.notNull}")
    private LocalDateTime endTime;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    private String remark;

}
