package com.tofly.dispatch.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tofly.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@EqualsAndHashCode
@ToString
public class DispatchVo implements Serializable {
    /**
     * ID
     */
    @ApiModelProperty(value = "ID")
    private Long id;
    /**
     * 调度类型1:日常调度;2:开关阀/泵
     */
    @ApiModelProperty(value = "调度类型1:日常调度;2:开关阀/泵")
    private Short dispatchType;
    /**
     * 调度方案名称
     */
    @ApiModelProperty(value = "调度方案名称")
    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;

    /**
     * 上级名称默认0
     */
    @ApiModelProperty(value = "上级名称默认0")
    private Long upDispatchId;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;


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

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

    /**
     * 水厂id
     */
    @ApiModelProperty(value = "温湿度")
    private String temperatureHumidity;

    /**
     * 水位
     */
    @ApiModelProperty(value = "水位")
    private String waterLevel;

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


    /**
     * 子级
     */
    @ApiModelProperty(value = "子级")
    private List<DispatchVo> childLevel;

}
