package com.njcn.advance.pojo.param.assess;

import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 评估用户查询参数
 * </p>
 *
 * @author cdf
 * @since 2025-06-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "AssessUserQuery", description = "评估用户查询参数")
public class AssessUserQuery extends BaseParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评估用户名称", required = true)
    @NotBlank(message = "评估用户名称不可为空")
    private String assessName;

    @ApiModelProperty(value = "所属部门id，例：南京市供电公司", required = true)
    @NotBlank(message = "所属部门id不可为空")
    private String deptId;

    @ApiModelProperty(value = "所属部门名称，例：南京市供电公司", required = true)
    @NotBlank(message = "所属部门名称不可为空")
    private String deptName;

    @ApiModelProperty(value = "用户协议容量，单位MVA，例：10.00", required = true)
    @NotNull(message = "用户协议容量不可为空")
    private BigDecimal agreedCapacity;

    @ApiModelProperty(value = "用户电压等级，例：32。与PMS3.0内电压等级编码保持一致。", required = true)
    @NotBlank(message = "用户电压等级不可为空")
    private String userScale;

    @ApiModelProperty(value = "是否包含电容器，例：00-不包含电容器 01-包含电容器", required = true)
    @NotBlank(message = "是否包含电容器")
    private String withCapacitor;

    @ApiModelProperty(value = "用户负荷类型，例：01-风电场，02-光伏 03-其他", required = true)
    @NotBlank(message = "用户负荷类型不可为空")
    private String isWindfarm;

    @ApiModelProperty(value = "变电站ID，例：0012030456", required = true)
    @NotBlank(message = "变电站ID不可为空")
    private String powerstationId;

    @ApiModelProperty(value = "变电站名称，例：110kV南站变", required = true)
    @NotBlank(message = "变电站名称不可为空")
    private String powerstationName;

    @ApiModelProperty(value = "变电站电压等级，例：32。与PMS3.0内电压等级编码保持一致。", required = true)
    @NotBlank(message = "变电站电压等级不可为空")
    private String powerstationScale;

    private List<String> powerstationScaleList;

    @ApiModelProperty(value = "母线ID，例：0012030456")
    private String busId;

    @ApiModelProperty(value = "母线名称，例：35kV I段母线")
    private String busName;

    @ApiModelProperty(value = "母线电压等级，例：32。与PMS3.0内电压等级编码保持一致。")
    private String busScale;

    private List<String> busScaleList;

    @ApiModelProperty(value = "线路ID，例：0012030456")
    private String lineId;

    @ApiModelProperty(value = "线路名称，例：35kV 南站一线")
    private String lineName;

    @ApiModelProperty(value = "线路名称，例：35kV 南站一线")
    private String lineScale;

    @ApiModelProperty(value = "供电设备容量，单位MVA，例：100.00")
    private BigDecimal powersupplyCapacity;

    @ApiModelProperty(value = "最小短路容量，单位MVA，例：150.00")
    private BigDecimal minshortcircuitCapacity;

    @ApiModelProperty(value = "线路线缆类型ID，从字典表获取，例：3491b6cce56141f1a2a0a79a15b0e91e")
    private String linetypeId;

    @ApiModelProperty(value = "PCC电电网电阻，例：200.00")
    private BigDecimal lineGridresistance;

    @ApiModelProperty(value = "PCC电电网电抗，例：200.00")
    private BigDecimal lineGridreactance;

    @ApiModelProperty(value = "线路长度，单位公里，例：200.00")
    private BigDecimal lineLen;

    @ApiModelProperty(value = "线路回路数，例：1")
    private BigDecimal lineNum;

    @ApiModelProperty(value = "有功容量，风电场装机容量/光伏电站装机容量/企业负荷计算功率，单位MW，例：200.00")
    private BigDecimal windfarmCapacity;

    @ApiModelProperty(value = "是否为单相负荷，例：00-否 01-是", required = true)
    @NotBlank(message = "是否为单相负荷")
    private String singleLoad;

    /**
     * 更新评估用户的查询参数
     */
    @EqualsAndHashCode(callSuper = true)
    @Data
    @ApiModel(value = "UpdateAssessUserQuery", description = "更新评估用户的查询参数")
    public static class UpdateAssessUserQuery extends AssessUserQuery {

        @ApiModelProperty(value = "评估用户ID，例：8afaa9a15707483a0157262f8e78077d", required = true)
        @NotBlank(message = "评估用户ID不可为空")
        private String assessId;
    }
}