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

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tofly.dispatch.dto.TfWaterInfoDto;
import com.tofly.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.annotation.Conditional;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


/**
 * 供水调度（日常->名称->详情；开关阀->方案->名称->详情）
 *
 * @author xqf
 * @date Mon Mar 14 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_DIS_DISPATCH_W", resultMap = "dispatchMap")
@KeySequence("TF_DIS_DISPATCH_W")
@ApiModel
public class Dispatch extends Model<Dispatch> {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "ID")
    private Long id;
    /**
     * 调度类型1:日常调度;2:关阀预案
     */
    @ApiModelProperty(value = "调度类型1:日常调度;2:关阀预案")
    private Short dispatchType;
    /**
     * 调度方案名称
     */
    @ApiModelProperty(value = "调度方案名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String dispatchSchemeName;
    /**
     * 执行开始时间
     */
    @ApiModelProperty(value = "执行开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 执行结束时间
     */
    @ApiModelProperty(value = "执行结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 是否有效1有效；0无效
     */
    @ApiModelProperty(value = "是否有效1有效；0无效")
    private Short isValid;
    /**
     * 是否删除1删除；0未删除
     */
    @ApiModelProperty(value = "是否删除1删除；0未删除")
    private Short isDel;
    /**
     * 上级名称默认0
     */
    @ApiModelProperty(value = "上级名称默认0")
    private Long upDispatchId;

    @ApiModelProperty(value = "备注")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String remark;


    /**
     * 水厂id
     */
    @ApiModelProperty(value = "水厂id")
    private String waterInfoId;

    /**
     * 天气
     */
    @ApiModelProperty(value = "天气")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String weather;

    /**
     * 水厂id
     */
    @ApiModelProperty(value = "温湿度")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String temperatureHumidity;

    /**
     * 水位
     */
    @ApiModelProperty(value = "水位")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String waterLevel;

    @ApiModelProperty(value = "调度专家库ids")
    private String dispatchExpertIds;

    @ApiModelProperty(value = "关联的调度专家库列表",hidden = true)
    @TableField(exist = false)
    private List<DispatchExpert> listExpert;

    @ApiModelProperty(value = "关联的水厂信息",hidden = true)
    @TableField(exist = false)
    private TfWaterInfoDto waterInfo;

    /**
     * 创建人
     */
    @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;




}
