package com.njcn.advance.pojo.dto.relevent;

import com.njcn.advance.pojo.dto.SagEvent;
import lombok.Data;

@Data
public class EntityGroupEvtData implements Cloneable,Comparable<EntityGroupEvtData> {

    //逻辑节点序号
    private int node;
    //事件开始时间时标
    private int start_time;
    //类别
    private int cata;
    //标注类别
    private int cata2;
    //物理节点
    private String nodePhysics;

    private SagEvent sagEvent;

    private String sagReason;


    public Object objClone() {
        try {
            return clone();
        } catch (CloneNotSupportedException e) {
            return new EntityGroupEvtData(null, -1, -1, -1,null,null);
        }
    }

    public EntityGroupEvtData(String nodePhysics, int start_time, int cata, int cata2, SagEvent sagEvent, String sagReason) {
        this.nodePhysics = nodePhysics;
        this.start_time = start_time;
        this.cata = cata;
        this.cata2 = cata2;
        this.sagEvent = sagEvent;
        this.sagReason = sagReason;
    }


    @Override
    public int compareTo(EntityGroupEvtData obj) {
        if(this.getStart_time() < obj.getStart_time()){
            return -1;
        }else if(this.getStart_time() > obj.getStart_time()){
            return 1;
        }

        return 0;
    }
}
