package com.jiayue.ipfcst.common.data.entity;

import com.jiayue.ipfcst.common.data.abst.AbstractBaseEntity;
import com.jiayue.ipfcst.common.data.constant.enums.AlarmStatusEnum;
import com.jiayue.ipfcst.common.data.constant.enums.AlarmTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;

import javax.persistence.*;

/**
 * 系统告警实体
 *
 * @author zzy
 * @version 1.0
 * @since 2019/7/22 10:23
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
public class SysAlarm extends AbstractBaseEntity {

    @Id
    @Order(1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    private Integer id;

    /**
     * 错误信息
     */
    @Column
    @Lob
    private String errorInfo;

    /**
     * 问题类型
     */
    @Column
    @Enumerated(EnumType.STRING)
    private AlarmTypeEnum alarmTypeEnum;

    /**
     * 问题名称
     */
    @Column
    private String name;

    /**
     * 问题描述
     */
    @Column
    @Lob
    private String describe;

    /**
     * 问题状态
     */
    @Column
    @Enumerated(EnumType.STRING)
    private AlarmStatusEnum alarmStatusEnum;

    /**
     * 处理办法
     */
    @Column
    private String solution;

    /**
     * 问题优先级
     */
    @Column
    private String pritority;

}
