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

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

@Getter
@AllArgsConstructor
public enum SettlementStatusEnum {
    NOT_SETTLED(0, "未结算"),
    SETTLED(1, "已结算");

    private final Integer status;
    private final String name;

    public static SettlementStatusEnum valueOf(Integer status) {
        return Arrays.stream(values())
                .filter(item -> item.getStatus().equals(status))
                .findFirst().orElse(null);
    }
}
