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 lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * 中台T-2电压越限日聚合表
 * <p>
 * dim_level=county/substation/feeder，按 over_date(yyyymmdd) 分日存储。
 * 16个count字段覆盖4维度(台区/用户/馈线/母线) × 4级别(越上限严重/一般 + 越下限严重/一般)。
 *
 * @author lsl
 * @since 2026-07-23
 */
@TableName("ads_mrt_voltage_over_limit_daily_result")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FhzgDwmVoltageOverLimitDaily implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /** 统计日期yyyymmdd */
    private String overDate;

    /** county/substation/feeder */
    private String dimLevel;

    private String provinceId;
    private String provinceName;
    private String cityOrgId;
    private String cityOrgName;
    private String maintainerId;
    private String maintainerName;
    private String substationId;
    private String substationName;
    private String feederId;
    private String feederName;

    // --- 越上限-严重 ---
    private Integer overUpperSevereTgCount;
    private Integer overUpperSevereCustCount;
    private Integer overUpperSevereFeederCount;
    private Integer overUpperSevereGeneratrixCount;

    // --- 越上限-一般 ---
    private Integer overUpperMildTgCount;
    private Integer overUpperMildCustCount;
    private Integer overUpperMildFeederCount;
    private Integer overUpperMildGeneratrixCount;

    // --- 越下限-严重 ---
    private Integer overLowerSevereTgCount;
    private Integer overLowerSevereCustCount;
    private Integer overLowerSevereFeederCount;
    private Integer overLowerSevereGeneratrixCount;

    // --- 越下限-一般 ---
    private Integer overLowerMildTgCount;
    private Integer overLowerMildCustCount;
    private Integer overLowerMildFeederCount;
    private Integer overLowerMildGeneratrixCount;

    /** 当日越限总时长(小时) */
    private BigDecimal totalOverLimitHours;

    private LocalDateTime ctime;
    private LocalDateTime mtime;
}