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

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

@Getter
@AllArgsConstructor
public enum BizTypeEnum {
    HYDROGEN_DEDUCTION(0, "加氢扣款"),
    BILL_SETTLEMENT(1, "账单结算"),
    MANUAL_ADJUST(2, "手动调整"),
    RECHARGE(3, "充值"),
    REMIT(4, "汇款");

    private final Integer type;
    private final String name;

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