package com.tofly.water.entity;

import com.baomidou.mybatisplus.annotation.*;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haiqiu.tools.excel.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 设备水泵数据关联
 * @author HaiQiu
 * @TableName TF_DEVICE_PUMP
 */
@TableName(value ="TF_DEVICE_PUMP")
@Data
public class DevicePump implements Serializable {
    /**
     * 主键ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 泵站ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pumpId;

    /**
     * 泵组ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pumpGroupId;

    /**
     * 泵组所属泵站ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pumpGroupForPid;

    /**
     * 删除，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)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ApiModelProperty(value = "泵站信息", hidden = true)
    private BasePump basePump;

    @TableField(exist = false)
    @ApiModelProperty(value = "泵组信息集合", hidden = true)
    private List<BasePumpGroup> basePumpGroups;
}