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 : siliter.yuan
 * @CreateDate : 2019-05-31 9:47
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_EVENT_PHENOMENON")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("ANDON_事件现象")
public class AndonEventPhenoMenon extends BaseBean implements Serializable {

    private static final long serialVersionUID = -3844606172813258352L;

    @Column(name = "EPM_CODE")
    @ApiParam(value = "事件现象代码")
    private String epmCode;

    @Column(name = "EPM_NAME")
    @ApiParam(value = "事件现象描述")
    private String epmName;

    @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;
}
