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


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.annotation.Resource;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 房间仪表
 * </p>
 *
 * @author cxj
 * @since 2023-11-21
 */
@Data
@ApiModel(value="PropertyPublicMeterAddDto", description="新增")
public class PropertyPublicMeterAddDto {

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

    @NotNull
    @ApiModelProperty(name = "parkId", value = "园区id")
    private Long parkId;

    /**
     * 仪表名称
     */
    @NotBlank
    @ApiModelProperty(name = "meterFullName", value = "仪表名称")
    private String meterFullName;

    @NotNull
    @Range(min = 1,max = 5)
    @ApiModelProperty(name = "shareType", value = "分摊方式:1平均分摊,2按照建筑面积分摊,3按照使用面积分摊,4按照用量分摊,5自动义公式进行分摊")
    private Integer shareType;

    /**
     * 分摊总面积
     */
    @ApiModelProperty(name = "shareArea", value = "分摊总面积")
    private BigDecimal shareArea;

    /**
     * 公摊仪表类型:1公摊表,2总表
     */
    @ApiModelProperty(name = "shareMeterType", value = "公摊仪表类型:1公摊表,2总表")
    private Integer shareMeterType;

    /**
     * 仪表类型id
     */
    @ApiModelProperty(name = "meterId", value = "仪表类型id")
    private Long meterId;

    /**
     * 倍率
     */
    @ApiModelProperty(name = "rate", value = "倍率")
    private BigDecimal rate;

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

    /**
     * 回程
     */
    @ApiModelProperty(name = "backhaul", value = "回程")
    private BigDecimal backhaul;

    /**
     * 读数日期
     */
    @ApiModelProperty(name = "readingTime", value = "读数日期")
    private Date readingTime;

    /**
     * 当前读数
     */
    @ApiModelProperty(name = "currentNum", value = "当前读数")
    private BigDecimal currentNum;


    @ApiModelProperty(name = "isMeterReading", value = "是否抄表:0否,1是")
    private Integer isMeterReading;

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

    @ApiModelProperty(name = "remark", value = "备注说明")
    private String remark;

    @NotNull
    @ApiModelProperty(name = "initNum", value = "初始读数")
    private BigDecimal initNum;
    /**
     * 初始日期
     */
    @NotNull
    @ApiModelProperty(name = "initTime", value = "初始日期")
    private Date initTime;

    @ApiModelProperty(name = "maxNum", value = "最大读数")
    private BigDecimal maxNum;


    @ApiModelProperty(name = "houseIds", value = "房间集合")
    private List<Long> houseIds;

}
