package com.hdkj.lt.bf.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
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 lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("fhzg_se_monitor_current")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FhzgSeMonitorCurrent implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    private String feederId;
    private String feederName;
    /** 必须用 IGNORED，否则 updateById 跳过 null → DB 残留旧值 → 状态机误判 */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDateTime firstOverTime;
    private BigDecimal lastLoadRate;
    private Integer lastStatus;
    private LocalDateTime lastSnapTime;
    private Integer alarmTriggered;
    /** 必须用 IGNORED，同上（null 表示无活跃事件） */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long alarmEventId;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
