package cn.estsh.i3plus.pojo.andon.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.AndonEnumUtil;
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 javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Description : ANDON_事件处理方法
 * @Reference :
 * @Author : hansen.ke
 * @CreateDate : 2019-05-13 17:16
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_EVENT_METHOD")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "ANDON_事件处理方法")
public class AndonEventMethod extends BaseBean implements Serializable {

    private static final long serialVersionUID = 2079366249221906256L;

    @Column(name = "EM_CODE")
    @ApiParam(value = "事件方法代码")
    private String emCode;

    @Column(name = "EM_NAME")
    @ApiParam(value = "事件方法描述")
    private String emName;

    @AnnoOutputColumn(hidden = true)
    @Column(name = "PARENT_EM_CODE")
    @ApiParam(value = "父阶方法代码")
    private String parentEmCode;

//    @AnnoOutputColumn(refClass = AndonEnumUtil.ALARM_TYPE.class,refForeignKey = "value",value = "description")
    @Column(name = "ALARM_CODE")
    @ApiParam(value = "安灯类型")
    private String alarmCode;

    @AnnoOutputColumn(hidden = true)
    @Transient
    @ApiParam(value = "工作中心")
    private String workCenterCode;

    @AnnoOutputColumn(hidden = true)
    @Transient
    @ApiParam(value = "工作单元")
    private String workCellCode;
}
