package com.ningdatech.pmapi.projectlib.model.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 立项批复参数类
 * </p>
 *
 * @author WendyYang
 * @since 20:04 2023/2/12
 */
@Data
@ApiModel("立项批复参数类")
public class ProjectApprovedReq {

    @ApiModelProperty("项目ID")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @ApiModelProperty("批复金额")
    @NotNull(message = "批复金额不能为空")
    @DecimalMax(value = "999999999.99", message = "批复金额无效")
    @DecimalMin(value = "0.01", message = "批复金额无效")
    private BigDecimal approvedAmount;

    @NotNull(message = "批复时间不能为空")
    @ApiModelProperty("批复时间")
    private LocalDate approvedDate;

    @ApiModelProperty("建设周期")
    @NotNull(message = "建设周期不能为空")
    @Range(min = 1, max = 99999, message = "建设周期无效")
    private Integer buildCycle;

    @ApiModelProperty("批复文件ID")
    @NotNull(message = "批复文件不能为空")
    private Long approvedFileId;

    @ApiModelProperty("建设方案文件ID")
    @NotNull(message = "建设方案不能为空")
    private Long buildPlanFileId;

}
