package cn.iocoder.yudao.module.energy.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum AdjustmentTypeEnum {
    INCREASE(0, "调增"),
    DECREASE(1, "调减");

    private final Integer type;
    private final String name;

    public static AdjustmentTypeEnum valueOf(Integer type) {
        return Arrays.stream(values())
                .filter(item -> item.getType().equals(type))
                .findFirst().orElse(null);
    }
}
