package com.yuchen.saas.park.api.entity.property;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nest.springwrap.core.tenant.mp.TenantEntity;

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

/**
 * <p>
 * 房源仪表抄表
 * </p>
 *
 * @author cxj
 * @since 2023-11-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("property_house_meter_reading")
@ApiModel(value="PropertyHouseMeterReading对象", description="房源仪表抄表")
public class PropertyHouseMeterReading extends TenantEntity {

    /**
     * 园区id
     */
    @ApiModelProperty(name = "parkId", value = "园区id")
    private Long parkId;
    /**
     * 房间id
     */
    @ApiModelProperty(name = "houseId", value = "房间id")
    private Long houseId;
    /**
     * 楼栋id
     */
    @ApiModelProperty(name = "buildingId", value = "楼栋id")
    private Long buildingId;
    /**
     * 所在楼层
     */
    @ApiModelProperty(name = "floorNum", value = "所在楼层")
    private Integer floorNum;
    /**
     * 所在单元
     */
    @ApiModelProperty(name = "unitNum", value = "所在单元")
    private String unitNum;
    /**
     * 资源代码
     */
    @ApiModelProperty(name = "resourceCode", value = "资源代码")
    private String resourceCode;

    @ApiModelProperty(name = "resourceId", value = "资源id")
    private Long resourceId;
    /**
     * 资源类型:1园区,2楼栋,3房间
     */
    @ApiModelProperty(name = "resourceType", value = "资源类型:1园区,2楼栋,3房间")
    private Integer resourceType;
    /**
     * 房源仪表id
     */
    @ApiModelProperty(name = "houseMeterId", value = "房源仪表id")
    private Long houseMeterId;
    /**
     * 仪表类型id
     */
    @ApiModelProperty(name = "meterId", value = "仪表类型id")
    private Long meterId;
    /**
     * 是否是初始记录,0否1是
     */
    @ApiModelProperty(name = "isInit", value = "是否是初始记录,0否1是")
    private Integer isInit;

    @ApiModelProperty(name = "isCharging", value = "是否已经计费,0未1已计费")
    private Integer isCharging;

    @ApiModelProperty(name = "meterReadingTime", value = "抄表时间")
    private Date chargingTime;

    @ApiModelProperty(name = "feeStandardId", value = "收费标准id(计费的时候回填,作为当时的计费依据记录,有计费才有)")
    private Long feeStandardId;

    @ApiModelProperty(name = "orgUserName", value = "抄表人在组织中的名字")
    private String orgUserName;
    /**
     * 抄表时间
     */
    @ApiModelProperty(name = "meterReadingTime", value = "抄表时间")
    private Date meterReadingTime;
    /**
     * 抄表读数
     */
    @ApiModelProperty(name = "meterReadingNum", value = "抄表读数")
    private BigDecimal meterReadingNum;
    /**
     * 上次抄表时间
     */
    @ApiModelProperty(name = "lastMeterReadingTime", value = "上次抄表时间")
    private Date lastMeterReadingTime;
    /**
     * 上次抄表读数
     */
    @ApiModelProperty(name = "lastMeterReadingNum", value = "上次抄表读数")
    private BigDecimal lastMeterReadingNum;
    /**
     * 上次抄表id
     */
    @ApiModelProperty(name = "lastMeterReadingId", value = "上次抄表id")
    private Long lastMeterReadingId;

    //未计费的情况是临时值,已计费的话就不可变为历史值!!!!!!!
    @ApiModelProperty(name = "rate", value = "倍率(按产品要求不使用历史记录这个字段,但是做为历史记录,先冗余进来)")
    private BigDecimal rate;
    /**
     * 用量(保留小数点为历史记录,冗余进来)
     */
    @ApiModelProperty(name = "dosage", value = "用量(保留小数点为历史记录,冗余进来)")
    private BigDecimal dosage;

    @ApiModelProperty(name = "parentId", value = "父表id")
    private Long parentId;

    @ApiModelProperty(name = "attritionRate", value = "损耗率")
    private BigDecimal attritionRate;

}
