package com.hdkj.lt.bf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 指标计算结果实体
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("t_indicator_result")
@ApiModel(description = "指标计算结果")
public class IndicatorResult implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "批次ID")
    private String batchId;

    @ApiModelProperty(value = "区县ID")
    private Integer countyId;

    @ApiModelProperty(value = "区县SID")
    private String countySid;

    @ApiModelProperty(value = "区县名称")
    private String countyName;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "计算结果")
    private String computeResult;

    @ApiModelProperty(value = "生成时间")
    private String generatedAt;

    @ApiModelProperty(value = "最大负载率(%)")
    private BigDecimal maxLoadRatePct;

    @ApiModelProperty(value = "最小负载率(%)")
    private BigDecimal minLoadRatePct;

    @ApiModelProperty(value = "平均负载率(%)")
    private BigDecimal avgLoadRatePct;

    @ApiModelProperty(value = "告警阈值(%)")
    private BigDecimal alarmThresholdPct;

    @ApiModelProperty(value = "最大电压(pu)")
    private BigDecimal maxVoltagePu;

    @ApiModelProperty(value = "最小电压(pu)")
    private BigDecimal minVoltagePu;

    @ApiModelProperty(value = "平均电压(pu)")
    private BigDecimal avgVoltagePu;

    @ApiModelProperty(value = "总损耗率(%)")
    private BigDecimal totalLossRatePct;

    @ApiModelProperty(value = "变压器损耗率(%)")
    private BigDecimal transformerLossRatePct;

    @ApiModelProperty(value = "线路损耗率(%)")
    private BigDecimal lineLossRatePct;

    @ApiModelProperty(value = "负载率越限")
    private Integer loadRateOverLimit;

    @ApiModelProperty(value = "电压越上限")
    private Integer voltageOverUpperLimit;

    @ApiModelProperty(value = "电压越下限")
    private Integer voltageUnderLowerLimit;

    @ApiModelProperty(value = "越限数量")
    private Integer overLimitCount;

    @ApiModelProperty(value = "越限馈线ID")
    private String overLimitFeederIds;

    @ApiModelProperty(value = "是否触发重构")
    private Integer reconfigurationTriggered;

    @ApiModelProperty(value = "触发类型")
    private String triggerType;

    @ApiModelProperty(value = "问题馈线ID")
    private String problemFeederIds;

    @ApiModelProperty(value = "原始响应")
    private String rawResponse;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
}
