package com.njcn.device.pq.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;

/**
 * 线路信息表
 *
 * @author hongawen
 * @since 2021-04-09
 */
@Data
@ApiModel
public class LineParam {

    @ApiModelProperty(name = "lineIndex",value = "监测点索引")
    private String lineIndex;

    @ApiModelProperty(name = "name",value = "监测点名称",required = true)
    @NotBlank(message = "监测点名称不可为空")
    //@Pattern(regexp = PatternRegex.DEV_NAME_REGEX,message = "监测点名称违规")
    private String name;

    @ApiModelProperty(name = "name",value = "原监测点名称",required = true)
    private String oldName;
    /**
     * PT一次变比
     */
    @ApiModelProperty(name = "pt1",value = "PT一次变比",required = true)
    @NotNull(message = "PT一次变比不可为空")
    @Min(value = 1,message = "PT一次变比最小值应大于等于1")
    private Float pt1;

    /**
     * PT二次变比
     */
    @ApiModelProperty(name = "pt2",value = "PT二次变比",required = true)
    @NotNull(message = "PT二次变比不可为空")
    @Min(value = 1,message = "PT二次变比最小值应大于等于1")
    private Float pt2;

    /**
     * CT一次变比
     */
    @ApiModelProperty(name = "ct1",value = "CT一次变比",required = true)
    @NotNull(message = "CT一次变比不可为空")
    @Min(value = 1,message = "CT一次变比最小值应大于等于1")
    private Float ct1;

    /**
     * CT二次变比
     */
    @ApiModelProperty(name = "ct2",value = "CT二次变比",required = true)
    @NotNull(message = "CT二次变比不可为空")
    @Min(value = 1,message = "CT二次变比最小值应大于等于1")
    private Float ct2;

    /**
     * 设备容量
     */
    @ApiModelProperty(name = "devCapacity",value = "设备容量",required = true)
    @NotNull(message = "设备容量不可为空")
    @Min(value=0,message = "设备容量格式有误")
    private Float devCapacity;

    /**
     * 短路容量
     */
    @ApiModelProperty(name = "shortCapacity",value = "短路容量",required = true)
    @NotNull(message = "短路容量不可为空")
    @Min(value=0,message = "设备容量格式有误")
    private Float shortCapacity;

    /**
     * 协议容量
     */
    @ApiModelProperty(name = "dealCapacity",value = "协议容量",required = true)
    @NotNull(message = "协议容量不可为空")
    @Min(value=0,message = "设备容量格式有误")
    private Float dealCapacity;

    /**
     * 基准容量
     */
    @ApiModelProperty(name = "standardCapacity",value = "基准容量新增时候可为空",required = true)
    @NotNull(message = "基准容量不可为空")
    @Min(value=0,message = "设备容量格式有误")
    private Float standardCapacity;


    @ApiModelProperty(name = "timeInterval",value = "测量间隔",required = true)
    @NotNull(message = "监测点测量间隔不可为空")
    @Range(min = 1,max = 30,message = "取值范围1到30分钟")
    private Integer timeInterval;

    @ApiModelProperty(name = "loadType",value = "（关联PQS_Dicdata表）负荷类型Guid",required = true)
    @NotBlank(message = "负荷类型不为空")
    private String loadType;

    @ApiModelProperty(name = "businessType",value = "（关联PQS_Dicdata表）行业类型Guid",required = true)
    @NotBlank(message = "行业类型不为空")
    private String businessType;

    @ApiModelProperty(name = "remark",value = "备注")
    private String remark;

    @ApiModelProperty(name = "monitorId",value = "国网谐波监测平台监测点号")
    private String monitorId;


    @ApiModelProperty(name = "powerFlag",value = "监测点性质 0-电网侧，1-非电网侧",required = true)
    @NotNull(message = "监测点性质不为空")
    private Integer powerFlag;

    @ApiModelProperty(name = "objName",value = "监测点对象名称")
    private String objName;

    @ApiModelProperty(name = "objId",value = "对象id")
    private String objId;

    @ApiModelProperty(name = "bigObjType",value = "对象大类")
//    @NotBlank(message = "对象大类不可为空")
    private String bigObjType;

    @ApiModelProperty(name = "smallObjType",value = "对象小类")
//    @NotBlank(message = "对象小类不可为空")
    private String smallObjType;

    /**
     * 接线类型(0:星型接法;1:三角型接法;2:开口三角型接法)
     */
    @ApiModelProperty(name = "ptType",value = "接线类型(0:星型接法;1:三角型接法;2:开口三角型接法)",required = true)
    @NotNull(message = "接线类型不可为空")
    @Range(min = 0,max = 2,message = "接线类型有误")
    private Integer ptType;

    @ApiModelProperty(name = "num",value = "监测点序列",required = true)
    @NotNull(message = "监测点序号不可为空")
    private Integer num;

    @ApiModelProperty(name = "sort",value = "排序",required = true)
    @NotNull(message = "排序不可为空")
    @Min(value = 0,message = "排序格式有误")
    private Integer sort;

    /**
     * 电压上偏差限值
     */
    @ApiModelProperty(name = "voltageDev",value = "电压上偏差限值",required = true)
    private Float voltageDev;

    /**
     * 电压下偏差限值
     */
    @ApiModelProperty(name = "uvoltageDev",value = "电压下偏差限值",required = true)
    private Float uvoltageDev;

    @ApiModelProperty(name = "powerSubstationName",value = "电网侧变电站")
    private String powerSubstationName;

    /**
     * 分类等级
     */
    @ApiModelProperty(name = "calssificationGrade",value = "分类等级")
    private String calssificationGrade;

    @ApiModelProperty(name = "superiorsSubstation",value = "上级电站")
    private String superiorsSubstation;

    @ApiModelProperty(name = "statFlag",value = "是否参与报告统计 0.不参与 1.参与")
    private Integer statFlag;

    @ApiModelProperty(name = "hangLine",value = "挂接线路")
    private String hangLine;


    @ApiModelProperty(name = "owner",value = "监测点拥有者")
    private String owner;


    @ApiModelProperty(name = "ownerDuty",value = "拥有者职务")
    private String ownerDuty;


    @ApiModelProperty(name = "ownerTel",value = "拥有者联系方式")
    private String ownerTel;


    @ApiModelProperty(name = "wiringDiagram",value = "接线图")
    private String wiringDiagram;


    @ApiModelProperty(name = "updateFlag",value = "修改标识")
    private Integer updateFlag;

    @ApiModelProperty(name = "newStationId",value = "新能源场站信息ID")
    private String newStationId;

    @ApiModelProperty(name = "actualArea",value = "监测点实际安装位置")
    private String actualArea;
}
