package com.njcn.gather.tool.addledger.pojo.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 测点保存参数。
 */
@Data
@ApiModel("测点保存参数")
public class AddLedgerLineSaveParam {

    @ApiModelProperty("测点ID")
    private String lineId;

    @ApiModelProperty("父级设备ID")
    private String deviceId;

    @ApiModelProperty(value = "监测点名", required = true)
    @NotBlank(message = "测点名称不能为空")
    private String name;

    @ApiModelProperty(value = "线路号", required = true)
    @NotNull(message = "line_no 不能为空")
    @Min(value = 1, message = "line_no 必须在 1-20 之间")
    @Max(value = 20, message = "line_no 必须在 1-20 之间")
    private Integer lineNo;

    @ApiModelProperty(value = "接线方式", required = true)
    @NotNull(message = "conType 不能为空")
    private Integer conType;

    @ApiModelProperty(value = "电压等级", required = true)
    @NotNull(message = "vol_grade 不能为空")
    private BigDecimal volGrade;

    @ApiModelProperty("安装位置")
    private String position;

    @ApiModelProperty(value = "CT 一次额定值", required = true)
    @NotNull(message = "ct_ratio 不能为空")
    @DecimalMin(value = "0", inclusive = true, message = "ct_ratio 不能为负数")
    private BigDecimal ctRatio;

    @ApiModelProperty(value = "CT 二次额定值", required = true)
    @NotNull(message = "ct2_ratio 不能为空")
    @DecimalMin(value = "0", inclusive = true, message = "ct2_ratio 不能为负数")
    private BigDecimal ct2Ratio;

    @ApiModelProperty(value = "PT 一次额定值", required = true)
    @NotNull(message = "pt_ratio 不能为空")
    @DecimalMin(value = "0", inclusive = true, message = "pt_ratio 不能为负数")
    private BigDecimal ptRatio;

    @ApiModelProperty(value = "PT 二次额定值", required = true)
    @NotNull(message = "pt2_ratio 不能为空")
    @DecimalMin(value = "0", inclusive = true, message = "pt2_ratio 不能为负数")
    private BigDecimal pt2Ratio;

    @ApiModelProperty("最小短路容量(MVA)")
    @DecimalMin(value = "0", inclusive = true, message = "short_circuit_capacity 不能为负数")
    private BigDecimal shortCircuitCapacity;

    @ApiModelProperty("供电设备容量(MVA)")
    @DecimalMin(value = "0", inclusive = true, message = "dev_capacity 不能为负数")
    private BigDecimal devCapacity;

    @ApiModelProperty("基准短路容量(MVA)")
    @DecimalMin(value = "0", inclusive = true, message = "basic_capacity 不能为负数")
    private BigDecimal basicCapacity;

    @ApiModelProperty("用户协议容量(MVA)")
    @DecimalMin(value = "0", inclusive = true, message = "protocol_capacity 不能为负数")
    private BigDecimal protocolCapacity;

    @ApiModelProperty("线路类型：0 主网，1 配网")
    private Integer lineType;

    @ApiModelProperty("监测对象类型")
    private String monitorObj;

    @ApiModelProperty("是否治理")
    private Integer isGovern;

    @ApiModelProperty("敏感用户")
    private String monitorUser;

    @ApiModelProperty("是否主要监测点")
    private Integer isImportant;
}
