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 java.io.Serializable;

/**
 * @Description : ANDON_上升流程配置
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-05-13 9:53
 * @Modify:
 **/
@Data
@Entity
@Table(name="ANDON_RITE_ROUTE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("ANDON_上升流程配置")
public class AndonRiteRoute extends BaseBean  implements Serializable {

    private static final long serialVersionUID = 5542314911937418047L;

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

    @AnnoOutputColumn(refClass = AndonEnumUtil.ANDON_ACTION_TAG.class,refForeignKey = "code",value = "description")
    @Column(name = "ANDON_STATUS")
    @ApiParam(value = "安灯状态")
    private String andonStatus;

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

    @Column(name = "MEMO")
    @ApiParam(value = "备注")
    private String memo;

    @AnnoOutputColumn(hidden = true)
    @Column(name = "WORK_CENTER_NAME_RDD")
    @ApiParam(value = "工作中心名称")
    private String workCenterNameRdd;
}
