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

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;
import java.util.stream.Collectors;


/**
 * DMA分区数据填报远传记录表
 *
 * @author admin
 * @date Tue May 17 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_DMA_REMOTE_METER", resultMap = "dmaRemoteMeterMap")
@KeySequence("TF_DMA_REMOTE_METER")
@ApiModel
public class DmaRemoteMeter extends Model<DmaRemoteMeter> {
    private static final long serialVersionUID = 1L;

    /**
     * $column.comments
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "$column.comments")
    private Long id;
    /**
     * 分区id
     */
    @ApiModelProperty(value = "分区id")
    private Long dmaId;
    @ApiModelProperty(value = "DMA编码")
    private String dmaCode;
    /**
     * DMA分区名称
     */
    @ApiModelProperty(value = "DMA分区名称")
    private String dmaName;

    @ApiModelProperty(value = "分区级别")
    private Integer dmaLevel;

    @ApiModelProperty(value = "分区级别名称")
    @TableField(exist = false)
    private String dmaLevelName;
    /**
     * 观察表id,关联TF_YWPN_DMATABLE_W主键
     */
    @ApiModelProperty(value = "观察表id,关联TF_YWPN_DMATABLE_W主键")
    private Long tableId;

    @ApiModelProperty(value = "观察表名称")
    private String tableName;

    @ApiModelProperty(value = "观察表编码")
    private String tableCode;
    /**
     * 起始读数
     */
    @ApiModelProperty(value = "起始读数")
    private BigDecimal startVal;
    /**
     * 起始读数日期
     */
    @ApiModelProperty(value = "起始读数日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;
    /**
     * 当前读数
     */
    @ApiModelProperty(value = "当前读数")
    private BigDecimal nowVal;
    /**
     * 当前读数日期
     */
    @ApiModelProperty(value = "当前读数日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date nowDate;
    /**
     * 换表补差水量
     */
    @ApiModelProperty(value = "换表补差水量")
    private BigDecimal poorHydration;
    /**
     * 当前用水量
     */
    @ApiModelProperty(value = "当前用水量")
    private BigDecimal nowWaterConsumption;
    /**
     * 填报人员
     */
    @ApiModelProperty(value = "填报人员")
    @TableField(value = "CREATE_USER",insertStrategy = FieldStrategy.IGNORED)
    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 = "修改时间")
    @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.UPDATE)
    private Date updateTime;
    @ApiModelProperty(value = "修改人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.UPDATE)
    private Long updateUser;
    @TableField(exist = false)
    @ApiModelProperty(hidden = true)
    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(exist = false)
    private Date startTime;

    @ApiModelProperty(value = "查询上报结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;
}
