/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.dispatch.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;
import java.util.stream.Collectors;


/**
 * 调度日志记录
 *
 * @author admin
 * @date Thu Nov 10 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_DIS_DISPATCH_LOG_W", resultMap = "dispatchLogMap")
@KeySequence("TF_DIS_DISPATCH_LOG_W")
@ApiModel
public class DispatchLog extends Model<DispatchLog> {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "主键")
    private Long id;
    /**
     * 调度方案id
     */
    @ApiModelProperty(value = "调度方案id")
    private Long dispatchId;
    /**
     * 调度时间
     */
    @ApiModelProperty(value = "调度时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dispatchTime;
    /**
     * 值班人员
     */
    @ApiModelProperty(value = "值班人员")
    private Long dutyPerson;


    @ApiModelProperty(value = "值班人员姓名",hidden = true)
    @TableField(exist = false)
    private String dutyPersonName;


    /**
     * 调度详情
     */
    @ApiModelProperty(value = "调度详情")
    private String dispatchRemark;
    /**
     * 工作情况
     */
    @ApiModelProperty(value = "工作情况,0未开始，1未完成，2已完成")
    private String workState;
    /**
     * 存在问题
     */
    @ApiModelProperty(value = "存在问题")
    private String existProblem;
    /**
     * 建议措施
     */
    @ApiModelProperty(value = "建议措施")
    private String suggestMeasures;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String updateUserName;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "调度方案信息",hidden = true)
    @TableField(exist = false)
    private Dispatch dispatchInfo;

}
