package cn.estsh.i3plus.pojo.mes.pcn.bean;


import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description :mes系统业务事件
 * @Reference :
 * @Author : jack.jia
 * @CreateDate : 2019-04-12
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_EVENT")
@Api("系统业务事件")
public class MesEvent extends BaseBean implements Serializable {
    private static final long serialVersionUID = -5604724665202938464L;
    @Column(name = "EVENT_CODE")
    @ApiParam("事件代码")
    private String eventCode;

    @Column(name = "EVENT_NAME")
    @ApiParam("事件名称")
    private String eventName;

    @Column(name = "EVENT_TYPE")
    @ApiParam("事件类型")
    private Integer eventType;

    @Column(name = "BUTTON_CODE")
    @ApiParam("按钮代码")
    private String buttonCode;

    public int getEventTypeVal() {
        return this.eventType == null ? 0 : this.eventType;
    }
}
