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 9:50
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_ALARM_CAUSE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "ANDON_呼叫原因")
public class AndonAlarmCause extends BaseBean implements Serializable {

    private static final long serialVersionUID = 5837347497945981811L;

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

    @Column(name = "AC_CODE")
    @ApiParam(value = "呼叫原因代码")
    private String acCode;

    @AnnoOutputColumn(hidden = true)
    @Column(name = "PARENT_AC_CODE")
    @ApiParam(value = "父阶原因代码")
    private String parentAcCode;

    @Column(name = "AC_NAME")
    @ApiParam(value = "呼叫原因描述")
    private String acName;

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

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


}
