package com.tofly.water.entity;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import com.tofly.common.constant.SqlCondition;
import com.tofly.scada.entity.DeviceArchiveManage;
import com.tofly.spire.entity.IndexAllocation;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;

import java.util.*;

import org.springframework.web.multipart.MultipartFile;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

import lombok.EqualsAndHashCode;
import com.haiqiu.tools.excel.annotation.Excel;

/**
 * 调度方案管理(LaborPlan)表实体类
 *
 * @author HaiQiu
 * @since 2022-11-22 13:57:01
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "TF_LABOR_PLAN", resultMap = "LaborPlanMap")
@ApiModel(value = "LaborPlan对象", description = "调度方案管理")
public class LaborPlan extends Model<LaborPlan> {

    private static final long serialVersionUID = 848674960252841358L;

    /**
     * 主键ID
     */
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 方案名称
     */
    @Excel(name = "方案名称")
    @ApiModelProperty(value = "方案名称")
    @TableField(condition = SqlCondition.ORACLE_LIKE)
    private String name;
    /**
     * TF_BASE_PUMP表ID（所属泵站ID）
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "TF_BASE_PUMP表ID（所属泵站ID）")
    @ApiModelProperty(value = "TF_BASE_PUMP表ID（所属泵站ID）")
    private Long pumpId;
    @TableField(exist = false)
    @ApiModelProperty(value = "泵站名称")
    private String pumpIdName;
    /**
     * TF_BASE_PUMP_GROUP表（水泵机组ID）
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "TF_BASE_PUMP_GROUP表（水泵机组ID）")
    @ApiModelProperty(value = "TF_BASE_PUMP_GROUP表（水泵机组ID）")
    private Long pumpGroupId;
    @TableField(exist = false)
    @ApiModelProperty(value = "泵组名称")
    private String pumpGroupIdName;
    /**
     * 方案编号
     */
    @Excel(name = "方案编号")
    @ApiModelProperty(value = "方案编号")
    private String code;
    /**
     * 运行时长
     */
    @Excel(name = "运行时长")
    @ApiModelProperty(value = "运行时长")
    private String runTime;
    /**
     * 预计供水量
     */
    @Excel(name = "预计供水量")
    @ApiModelProperty(value = "预计供水量")
    private String estimateWaterCapacity;
    /**
     * 应用场景
     */
    @Excel(name = "应用场景")
    @ApiModelProperty(value = "应用场景")
    private String scene;
    /**
     * 排序
     */
    @Excel(name = "排序")
    @ApiModelProperty(value = "排序")
    private Long sort;
    /**
     * 删除，0未删除，1已删除
     */
    @Excel(name = "删除，0未删除，1已删除")
    @TableLogic
    @ApiModelProperty(value = "删除，0未删除，1已删除")
    private Boolean deleted;
    /**
     * 创建人
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "创建人")
    @ApiModelProperty(value = "创建人")
    private Long createdUser;
    @TableField(exist = false)
    @ApiModelProperty(value = "创建人", hidden = true)
    private String createdUserName;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;
    /**
     * 更新人
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "更新人")
    @ApiModelProperty(value = "更新人")
    private Long updatedUser;
    @TableField(exist = false)
    @ApiModelProperty(value = "更新人", hidden = true)
    private String updatedUserName;
    /**
     * 更新时间
     */
    @Excel(name = "更新时间")
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "水泵信息集合")
    private List<PlanPump> planPumps;
}

