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 : crish.li
 * @CreateDate : 2019-08-22 11:20
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_CELL_EVENT_CAUSE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("ANDON_工作单元事件原因配置")
public class AndonCellEventCause extends BaseBean implements Serializable {

    private static final long serialVersionUID = -1641944472466007171L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam(value = "工作中心代码")
    private String workCenterCode;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam(value = "工位代码")
    private String workCellCode;

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

    @Column(name = "EC_CODE")
    @ApiParam(value = "事件原因代码")
    private String ecCode;

    @AnnoOutputColumn(hidden = true)
    @Transient
    @ApiParam(value = "安灯类型名称")
    private String alarmCodeName;

    @AnnoOutputColumn(hidden = true)
    @Transient
    @ApiParam(value = "事件原因描述")
    private String ecName;

}
