package com.njcn.advance.pojo.dto.govern.voltage;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author hongawen
 * @since 2024-02-29
 */
@Data
public class SgEventExcel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 暂降起始时间
     */
    @Excel(name="暂降发生时间(yyyy-MM-dd HH:mm:ss)",format = "yyyy-MM-dd HH:mm:ss",width = 45)
    @NotBlank(message = "暂降时间不能为空")
    private String startTime;

    /**
     * 暂降发生毫秒
     */
    @Excel(name="暂降发生毫秒",width = 45)
    @NotBlank(message = "暂降发生毫秒不能为空")
    private String ms;

    /**
     * 持续时间(单位：秒)
     */
    @Excel(name="持续时间(ms)",width = 25)
    @NotNull(message = "持续时间不能为空")
    private Double duration;

    /**
     * 特征幅值
     */
    @Excel(name="暂降幅值(范围0p.u.~1p.u.)",width = 28)
    @NotNull(message = "暂降幅值不能为空")
    @Min(value = 0)
    @Max(value = 1)
    private Double featureAmplitude;


    /**
     * 事件描述
     */
    @Excel(name="事件描述(非必填)",width = 30)
    private String eventDescribe;

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class SgEventExcelMsg extends SgEventExcel implements Serializable, IExcelModel {
        @Excel(name = "错误信息描述")
        private String errorMsg;
    }

}
