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

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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * @Description:
 * @Reference:
 * @Author: Crish
 * @CreateDate:2019-10-18-8:36
 * @Modify:
 **/
@Data
@MappedSuperclass
public class BaseManageQueue extends BaseBean implements Serializable {

    private static final long serialVersionUID = 5223610541891941843L;

    @Column(name = "ANDON_ORDER_NO")
    @ApiParam(value = "安灯队列编号")
    public String andonOrderNo;

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

    @Column(name = "ACTION_CODE")
    @ApiParam(value = "安灯动作代码")
    public String actionCode;

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

    @Column(name = "WORK_CENTER_NAME_RDD")
    @ApiParam(value = "工作中心名称")
    public String workCenterNameRdd;

    @Column(name = "WORK_CELL_NAME_RDD")
    @ApiParam(value = "工作单元名称")
    public String workCellNameRdd;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam(value = "工作单元代码")
    public String workCellCode;

    @Column(name = "EQUIPMENT_CODE")
    @ApiParam(value = "设备代码")
    public String equipmentCode;

    @Column(name = "EQUIPMENT_NAME_RDD")
    @ApiParam(value = "设备名称")
    public String equipmentNameRdd;

    @Column(name = "SHIFT_CODE")
    @ApiParam(value = "班次代码")
    public String shiftCode;

    @Column(name = "SHIFT_NAME_RDD")
    @ApiParam(value = "班次名称")
    public String shiftNameRdd;

    @Column(name = "STATUS_CODE")
    @ApiParam(value = "安灯状态代码")
    public String statusCode;

    @Column(name = "PRIORITY_LEVEL")
    @ApiParam(value = "优先级别", example = "1")
    public Integer priorityLevel;

    @Column(name="CALL_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiParam(value="呼叫时间",example = "2018-01-01 01:00:00")
    @AnnoOutputColumn(hidden = true)
    public String callTime;

    @Column(name="CLOSE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiParam(value="撤销时间",example = "2018-01-01 01:00:00")
    @AnnoOutputColumn(hidden = true)
    public String closeTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name="CONFIRM_TIME")
    @ApiParam(value = "响应时间", example = "2018-01-01 01:00:00")
    @AnnoOutputColumn(hidden = true)
    public String confirmTime;

    @Column(name="RESET_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiParam(value="解决时间",example = "2018-01-01 01:00:00")
    @AnnoOutputColumn(hidden = true)
    public String resetTime;

    @Column(name = "CALL_USER")
    @ApiParam(value = "呼叫人")
    public String callUser;

    @Column(name = "CLOSE_USER")
    @ApiParam(value = "撤销人")
    public String closeUser;

    @Column(name = "CONFIRM_USER")
    @ApiParam(value = "响应人")
    public String confirmUser;

    @Column(name = "RESET_USER")
    @ApiParam(value = "解决人")
    public String resetUser;

    @Column(name = "CLOSE_CAUSE")
    @ApiParam(value = "撤销原因")
    public String closeCause;

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

    @Column(name = "AC_NAME_RDD")
    @ApiParam(value = "呼叫原因描述")
    public String acNameRdd;

    @Column(name = "AC_DESC")
    @ApiParam(value = "呼叫具体原因")
    public String acDesc;

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

    @Column(name = "EC_NAME_RDD")
    @ApiParam(value = "事件原因描述")
    public String ecNameRdd;

    @Column(name = "EC_DESC")
    @ApiParam(value = "事件具体原因")
    public String ecDesc;

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

    @Column(name = "EM_NAME_RDD")
    @ApiParam(value = "事件方法描述")
    public String emNameRdd;
    

    @Column(name = "EM_DESC")
    @ApiParam(value = "事件具体方法")
    public String emDesc;

    @Column(name = "IS_HALT")
    @ApiParam(value = "是否停机", example = "1")
    public Integer isHalt;

    @Column(name = "HALT_CODE")
    @ApiParam(value = "停机类型")
    public String haltCode;

    @Column(name = "HALT_DESC")
    @ApiParam(value = "停机具体原因")
    public String haltDesc;

    /**
     * 处理类型：10=标准处理，20=自处理
     */
    @Column(name = "DISPOSAL_TYPE")
    @ApiParam(value = "处理类型")
    public String disposalType;

    @Column(name = "ALARM_DETAIL_CODE")
    @ApiParam(value = "安灯子类型代码")
    public String alarmDetailCode;

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