package com.hdkj.lt.bf.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

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

/**
 * 配变电压越限事件
 * <p>
 * 配变某断面电压越限时发布，异步监听器去查该配变下用户的电压。
 *
 * @author lsl
 * @since 2026-07-23
 */
@Getter
public class MvtransOverVoltageEvent extends ApplicationEvent {

    private static final long serialVersionUID = 1L;

    private final String mvtransId;
    private final String feederId;
    private final String countyId;
    private final String subsId;
    private final LocalDateTime snapshotTime;
    private final BigDecimal voltageRatio;

    public MvtransOverVoltageEvent(Object source, String mvtransId, String feederId,
                                   String countyId, String subsId,
                                   LocalDateTime snapshotTime, BigDecimal voltageRatio) {
        super(source);
        this.mvtransId = mvtransId;
        this.feederId = feederId;
        this.countyId = countyId;
        this.subsId = subsId;
        this.snapshotTime = snapshotTime;
        this.voltageRatio = voltageRatio;
    }
}