package com.zcxk.rmcp.core.mongo;

import com.zcxk.core.mongo.base.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.mongodb.core.mapping.Document;

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

/**
 * @author Andy
 * @version V1.0
 * @description: 抄表记录
 * @date 2021/7/22
 **/
@Data
@Document(collection = "rmcp_meter_read_record")
@ToString
public class MeterReadRecord extends BaseDO {

    @ApiModelProperty(value="年")
    private Integer year;

    @ApiModelProperty(value="租户")
    private String tenantId;

    @ApiModelProperty(value="分类")
    private Integer categoryId;

    @ApiModelProperty(value="公司ID")
    private Integer companyOrgId;

    @ApiModelProperty(value="公司名字")
    private String companyOrgName;

    @ApiModelProperty(value="部门Id")
    private Integer deptOrgId;

    @ApiModelProperty(value="部门名字")
    private String deptOrgName;

    @ApiModelProperty(value="小区ID")
    private Integer communityId;

    @ApiModelProperty(value="小区名字")
    private String communityName;

    @ApiModelProperty(value="集中器ID")
    private Integer concentratorId;

    @ApiModelProperty(value="集中器编码")
    private String concentratorCode;

    @ApiModelProperty(value="采集器ID")
    private Integer collectorId;

    @ApiModelProperty(value="采集器编码")
    private String collectorCode;

    @ApiModelProperty(value="设备id")
    private Long deviceId;

    @ApiModelProperty(value="设备编号")
    private String deviceNo;

    @ApiModelProperty(value="安装地址")
    private String location;

    @ApiModelProperty(value="产品ID/水表类型")
    private Integer productId;

    @ApiModelProperty(value="设备型号 <= 厂商名字/产品名字/产品型号")
    private String deviceModel;

    @ApiModelProperty(value="通道号")
    private String channelNumber;

    @ApiModelProperty(value="电子号")
    private String meterNo;

    @ApiModelProperty(value="档案号")
    private String fileNo;

    @ApiModelProperty(value="抄表数据")
    private List<MeterReadInfo> data;

    @Data
    public static  class MeterReadInfo implements Serializable  {

        @ApiModelProperty(value="读表日期")
        private Integer readDate;

        @ApiModelProperty(value="抄表时间/读表时间")
        private Long readTime;

        @ApiModelProperty(value="抄表状态 1：未抄 2：已抄")
        private Integer readStatus;

        @ApiModelProperty(value="阀门状态")
        private Integer valveStatus;

        @ApiModelProperty(value="读数")
        private Double readData;

        @ApiModelProperty(value="最近有效数据")
        private Double lastValid;

        @ApiModelProperty(value="距离上次的消耗/当天用水量")
        private Double lastCost;
    }



}
