package com.hdkj.lt.core.bizms.modle.po.plan;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hdkj.lt.base.model.entity.FhzgBaseEntity;
import com.hdkj.lt.base.serializer.BigDecimalSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * @author luorui
 * @date 2025/5/17 11:06
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("fhzg_plan_transfer_scheme_users")
public class FhzgPlanTransferSchemeUsers extends FhzgBaseEntity {
    /**
     * 计划停电区域方案ID(fhzg_plan_transfer_scheme.id)
     */
    private Long schemeId;
    /**
     * 用户(变压器)编码(psrId)
     */
    private String transformerNo;
    /**
     * 用户(变压器)名称
     */
    private String transformerName;
    /**
     * 用户类型：公变、中压用户
     */
    private String custType;
    /**
     * 有功功率(kW)
     */
    @JsonSerialize(using = BigDecimalSerializer.Keep6DecimalSerializer.class)
    private BigDecimal activePower;
    /**
     * 用户电流(A)
     */
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal userCurrent;
    /**
     * 用户电压(kV)
     */
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal userVoltage;
    /**
     * 用户无功功率
     */
    @JsonSerialize(using = BigDecimalSerializer.Keep6DecimalSerializer.class)
    private BigDecimal userReactivePower;
    /**
     * 是否重要用户：0-否，1-是
     */
    private String isCriticalUser;
    /**
     * 是否敏感用户：0-否，1-是
     */
    private String isSensitiveUser;
    /**
     * 数据区分:1-损失户数,2-重要敏感失电
     */
    private String dataType;

    /**
     * 是否保电用户：0-否，1-是
     */
    private String isProtectPower;

    /**
     * 用户起点开关ID
     */
    private String startSwitchId;

    /**
     * 用户起点开关名称
     */
    private String startSwitchName;

    /**
     * 冷倒预计时间(h)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal coldLossTimes;
    /**
     * 检修时长(h)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal repairTimes;
    /**
     * 损失电量(kWh)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal lossPowers;
    /**
     * 损失时户(时·户)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal lossCustHours;
    /**
     * 累计损失电量(kWh)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal totalLossPowers;
    /**
     * 累计损失时户(时·户)
     */
    @TableField(exist = false)
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal totalLossCustHours;

    /**
     * 损失重要用户数量
     */
    @TableField(exist = false)
    private Integer criticalUserCount;

    /**
     * 损失敏感用户数量
     */
    @TableField(exist = false)
    private Integer sensitiveUserCount;

    /**
     * 损失保电用户数量
     */
    @TableField(exist = false)
    private Integer protectUserCount;

    /**
     * 分页页长
     */
    @TableField(exist = false)
    private Long pageSize;
    /**
     * 分页页码
     */
    @TableField(exist = false)
    private Long pageNum;

}
