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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hdkj.lt.base.serializer.BigDecimalSerializer;
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;


/**
 * 运行异常转供-转供方案分析-结果分析-配电电压越限信息表
 *
 * @author lihao
 * @since 2025-07-05
 */
@TableName("fhzg_operation_abnormality_voltage_violation")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FhzgOperationAbnormalityVoltageViolation implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @ApiModelProperty(value = "运行异常ID")
    @TableField("oa_id")
    private Long oaId;

    @ApiModelProperty(value = "用户编号(变压器ID)")
    @TableField("psr_id")
    private String psrId;

    @ApiModelProperty(value = "用户名称(变压器名称)")
    @TableField("psr_name")
    private String psrName;

    @ApiModelProperty(value = "用户类型(变压器类型编码)")
    @TableField("psr_type")
    private String psrType;

    @ApiModelProperty(value = "用户类型（‘MV_TRAN’-‘公变’；‘MV_CUSTOMER’-‘中压用户接入点’）")
    @TableField("cust_type")
    private String custType;

    @ApiModelProperty(value = "转供前高压（中压）侧电压")
    @TableField("before_voltage")
    @JsonSerialize(using = BigDecimalSerializer.StripTrailingZerosSerializer.class)
    private BigDecimal beforeVoltage;

    @ApiModelProperty(value = "转供后高压（中压）侧电压")
    @TableField("after_voltage")
    @JsonSerialize(using = BigDecimalSerializer.StripTrailingZerosSerializer.class)
    private BigDecimal afterVoltage;

    @ApiModelProperty(value = "电压越线幅度")
    @TableField("extent_overvoltage")
    @JsonSerialize(using = BigDecimalSerializer.StripTrailingZerosSerializer.class)
    private BigDecimal extentOvervoltage;

    @ApiModelProperty(value = "转供前低压侧电压")
    @TableField("before_voltage_lv")
    @JsonSerialize(using = BigDecimalSerializer.StripTrailingZerosSerializer.class)
    private BigDecimal beforeVoltage_lv;

    @ApiModelProperty(value = "转供后低压侧电压")
    @TableField("after_voltage_lv")
    @JsonSerialize(using = BigDecimalSerializer.StripTrailingZerosSerializer.class)
    private BigDecimal afterVoltage_lv;

    @ApiModelProperty(value = "创建人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("creator")
    private Long creator;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最后一次修改人")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField("last_editor")
    private Long lastEditor;

    @ApiModelProperty(value = "最后一次修改时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("last_time")
    private LocalDateTime lastTime;

    @ApiModelProperty(value = "电压越限类型（1越下限，2越上限 3未越限）")
    @TableField(exist = false)
    private Integer overVoltageType;
}
