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

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
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 lombok.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 故障停电转供方案对侧线路负载率明细表
 * </p>
 *
 * @author luorui
 * @since 2025-05-29
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("fhzg_fault_transfer_scheme_opposite_line_load_factor")
public class FaultTransferSchemeOppositeLineLoadFactor extends FhzgBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主建ID
     */
    @TableId("id")
    private Long id;

    /**
     * 故障停电方案ID(fhzg_fault_transfer_scheme.id)
     */
    @TableField("scheme_id")
    private Long schemeId;

    /**
     * 对侧联络线路ID(finalStateSafetyCheckResult的feederSafetyCheckResult的bFdPSRID)
     */
    @TableField("opposite_line_id")
    private String oppositeLineId;

    /**
     * 对侧联络线路名称(finalStateSafetyCheckResult的feederSafetyCheckResult的bFdPSRID对应名称)
     */
    @TableField("opposite_line_name")
    private String oppositeLineName;

    /**
     * 转供后计算电流值(接口暂未提供)
     */
    @TableField("calculated_current")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal calculatedCurrent;

    /**
     * 额定电流(台账设备字段信息)
     */
    @TableField("rated_current")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal ratedCurrent;

    /**
     * 负载率(计算:calculated_current/rated_current*100)
     */
    @TableField("load_factor")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal loadFactor;

    /**
     * 转供前对侧负载率（转供前电流值/线路额定电流faultMaxCurrentValue）
     */
    @TableField("before_load_factor")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal beforeLoadFactor;

    /**
     * 转供前主变负载(取值待定)
     */
    @TableField("before_main_transformer_load_factor")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal beforeMainTransformerLoadFactor;

    /**
     * 转供后主变负载(取值待定)
     */
    @TableField("after_main_transformer_load_factor")
    @JsonSerialize(using = BigDecimalSerializer.Keep2DecimalSerializer.class)
    private BigDecimal afterMainTransformerLoadFactor;

    /**
     * 创建人
     */
    @TableField("creator")
    private Long creator;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 最后一次修改人
     */
    @TableField("last_editor")
    private Long lastEditor;

    /**
     * 最后一次修改时间
     */
    @TableField("last_time")
    private LocalDateTime lastTime;


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

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


}
