package com.gyee.wisdom.alarm.sharding.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class AlarmCountInfo implements Serializable {

    @TableId("id")
    private Long id;
    @TableField("alarmdate")
    private Date alarmdate;
    @TableField("snapid")
    private Long snapid;
    @TableField("count")
    private int count;
    @TableField("time")
    private String time;
    @TableField("alerttext")
    private String alerttext;
    @TableField("windturbineid")
    private String windturbineid;
    @TableField("alertureid")
    private String alertureid;
    @TableField("relatedParts")
    private String relatedParts;
    @TableField("project")
    private String project;
    @TableField("rank")
    private String rank;

    public double getTime1() {
        try {
            return Double.parseDouble(time);
        } catch (Exception ex) {
            return 0;
        }
    }
}
