package com.yuchen.saas.park.api.enums.property;

import lombok.Getter;
import org.nest.springwrap.core.log.exception.ServiceException;

@Getter
public enum AppBillPaymentTypeEnum {
    HOUSE_BILL(1, "房屋物业账单"),
    CUSTOMER_BILL(2, "客户账单"),

    ;

    private final int value;
    private final String desc;

    AppBillPaymentTypeEnum(int i, String desc) {
        value = i;
        this.desc = desc;
    }

    public static AppBillPaymentTypeEnum convert(int intValue) {
        AppBillPaymentTypeEnum[] allValues = AppBillPaymentTypeEnum.values();
        for(int i = 0; i < allValues.length; i++) {
            if(allValues[i].value == intValue) {
                return allValues[i];
            }
        }
        throw new ServiceException("AppBillPaymentTypeEnum 非法枚举参数值");
    }

}
