package com.casic.missiles.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 报警工单表
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
@Data
@TableName("alarm_job")
public class AlarmJob extends Model<AlarmJob> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;
    /**
     * 工单编号
     */
    @TableField("JOBCODE")
    private String jobcode;
    /**
     * 工单类型
     */
    @TableField("JOG_TYPE")
    private String jobType;
    /**
     * 井编号
     */
    @TableField("WELL_CODE")
    private String wellCode;
    /**
     * 设备编号
     */
    @TableField("DEVCODE")
    private String devcode;
    /**
     * 工单创建时间
     */
    @TableField("CREATE_TIME")
    private Date createTime;
    /**
     * 工单状态（0待处理，1待确认，2处理中，3完成）
     */
    @TableField("JOB_STATUS")
    private String jobStatus;
    /**
     * 接单人员
     */
    @TableField("GET_JOB_PERSON")
    private Long getJobPerson;
    /**
     * 接单时间
     */
    @TableField("GET_JOB_TIME")
    private Date getJobTime;
    /**
     * 应接单时间
     */
    @TableField("SHOULD_GET_TIME")
    private Date shouldGetTime;
    /**
     * 第一现场情况
     */
    @TableField("FIRST_STATE")
    private String firstState;
    /**
     * 第一现场照片
     */
    @TableField("FIRST_STATE_PHOTOS")
    private String firstStatePhotos;
    /**
     * 确认人员
     */
    @TableField("CONFIRM_JOB_PERSON")
    private Long confirmJobPerson;
    /**
     * 确认时间
     */
    @TableField("CONFRIM_JOB_TIME")
    private Date confrimJobTime;
    /**
     * 处理人员
     */
    @TableField("HANDLE_JOB_Person")
    private Long handleJobPerson;
    /**
     * 处理时间
     */
    @TableField("HANDLE_JOB_TIME")
    private Date handleJobTime;
    /**
     * 维护情况记录
     */
    @TableField("HANDLE_MESSAGE")
    private String handleMessage;
    /**
     * 维护图片
     */
    @TableField("HANDLE_PHOTOS")
    private String handlePhotos;
    /**
     * 工单流转记录
     */
    @TableField("FLOW")
    private String flow;

    @TableField("JOB_BELONG_TO")
    private Long jobBelongTo;

    @TableField("JOB_FLAG_DELAY")
    private String jobFlagDelay;

    @TableField("JOB_FLAG_1")
    private String jobFlag1;

    @TableField(exist = false)
    private String alarmValue;

    @TableField(exist = false)
    private String alarmContentName;

    @TableField(exist = false)
    private Integer recordId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AlarmJob{" +
        "id=" + id +
        ", jobcode=" + jobcode +
        ", jogType=" + jobType +
        ", wellCode=" + wellCode +
        ", devcode=" + devcode +
        ", createTime=" + createTime +
        ", jobStatus=" + jobStatus +
        ", getJobPerson=" + getJobPerson +
        ", getJobTime=" + getJobTime +
        ", firstState=" + firstState +
        ", firstStatePhotos=" + firstStatePhotos +
        ", confirmJobPerson=" + confirmJobPerson +
        ", confrimJobTime=" + confrimJobTime +
        ", handleJobPerson=" + handleJobPerson +
        ", handleJobTime=" + handleJobTime +
        ", handleMessage=" + handleMessage +
        ", handlePhotos=" + handlePhotos +
        ", flow=" + flow +
        ", recordId=" + recordId +
        "}";
    }
}
