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 DayValueVO implements Comparable<DayValueVO> {

    /**
     * 天数
     */
    @ApiModelProperty(value = "几号")
    private Integer dayNumber;

    /**
     * 天的总用量
     */
    @ApiModelProperty(value = "用量")
    private String dayValue;

    @Override
    public int compareTo(DayValueVO o) {

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