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

import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.system.validation.products.DurationUnitValid;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author Gqr
 * @since 2025/9/15 11:25
 */
@Schema(description = "管理后台 - 产品延期创建 Request VO")
@Data
public class ProductDelaySaveReqVO {
    @Schema(description = "组织编号")
    @NotNull(message = "{product.delay.save.organId.notNull}")
    private Long organId;

    @Schema(description = "购买记录编号")
    @NotNull(message = "{product.delay.save.purchaseId.notNull}")
    private Long purchaseId;

    @Schema(description = "延期时长", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "{product.delay.save.duration.notNull}")
    @NumberValid(name = "product.delay.duration.field")
    private Integer delayDuration;

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

    @Schema(description = "备注")
    @Size(max = 1024, message = "{product.delay.save.remark.size}")
    private String remark;
}
