package com.yuchen.saas.park.api.vo.park.energy;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author 颜艺波
 * @date 2021/8/24 16:49
 */
@Data
@AllArgsConstructor
public class HourValueVO implements Comparable<HourValueVO> {

    /**
     * 小时数
     */
    @ApiModelProperty(value = "小时")
    private Integer hourNumber;

    /**
     * 小时总的用量
     */
    @ApiModelProperty(value = "用量")
    private String hourValue;

    @Override
    public int compareTo(HourValueVO o) {

        if (this.hourNumber > o.getHourNumber()) {
            return 1;
        } else if (this.hourNumber < o.getHourNumber()) {
            return -1;
        } else {
            return 0;
        }
    }
}
