package com.tofly.water.entity;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tofly.common.constant.SqlCondition;
import com.tofly.water.entity.dto.BasePumpDetailDto;
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.math.BigDecimal;
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;

import javax.validation.constraints.Size;

/**
 * 水泵机组管理(BasePumpGroup)表实体类
 *
 * @author HaiQiu
 * @since 2022-11-22 13:57:03
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "TF_BASE_PUMP_GROUP", resultMap = "BasePumpGroupMap")
@ApiModel(value = "BasePumpGroup对象", description = "水泵机组管理")
public class BasePumpGroup extends Model<BasePumpGroup> {

    private static final long serialVersionUID = 281086980442242110L;

    /**
     * 主键ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 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;
    /**
     * 机组名称
     */
    @Excel(name = "机组名称")
    @ApiModelProperty(value = "机组名称")
    @TableField(condition = SqlCondition.ORACLE_LIKE)
    private String name;
    /**
     * 机组编号
     */
    @Excel(name = "机组编号")
    @ApiModelProperty(value = "机组编号")
    private String code;
    /**
     * 分组
     */
    @Excel(name = "分组")
    @ApiModelProperty(value = "分组")
    private String grouping;
    /**
     * 供应商简称
     */
    @Excel(name = "供应商简称")
    @ApiModelProperty(value = "供应商简称")
    @TableField(condition = SqlCondition.ORACLE_LIKE)
    private String supplierSimple;
    /**
     * 供应商全称
     */
    @Excel(name = "供应商全称")
    @ApiModelProperty(value = "供应商全称")
    @TableField(condition = SqlCondition.ORACLE_LIKE)
    private String supplierDetail;
    /**
     * 购买金额
     */
    @Excel(name = "购买金额")
    @ApiModelProperty(value = "购买金额")
    private BigDecimal purchaseAmount;
    /**
     * 购买日期
     */
    @ApiModelProperty(value = "购买日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date purchaseDate;

    /**
     * 投运日期
     */
    @ApiModelProperty(value = "投运日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date investmentDate;
    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "开关状态")
    private String powerState;

    /**
     * 进水管径
     */
    @Excel(name = "进水管径")
    @ApiModelProperty(value = "进水管径")
    private String inletPipeDiameter;
    /**
     * 出水管径
     */
    @Excel(name = "出水管径")
    @ApiModelProperty(value = "出水管径")
    private String outletPipeDiameter;
    /**
     * 附件（照片）
     */
    @Excel(name = "附件（照片）")
    @ApiModelProperty(value = "附件（照片）")
    private String annex;
    /**
     * 生产厂商简称
     */
    @Excel(name = "生产厂商简称")
    @ApiModelProperty(value = "生产厂商简称")
    private String productionSimple;
    /**
     * 生产厂商全称
     */
    @Excel(name = "生产厂商全称")
    @ApiModelProperty(value = "生产厂商全称")
    private String productionDetail;
    /**
     * 水泵数量
     */
    @Excel(name = "水泵数量")
    @ApiModelProperty(value = "水泵数量")
    private String quantity;
    /**
     * 水泵数据集合json扩展
     */
    @Excel(name = "水泵数据集合json扩展")
    @ApiModelProperty(value = "水泵数据集合json扩展")
    private String basePumpList;
    /**
     * 排序
     */
    @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;


    /**
     * 关联水泵基本信息集合
     */
    @ApiModelProperty(value = "关联水泵基本信息集合")
    @TableField(exist = false)
    private List<BasePumpDetail> pumpDetails;
}

