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

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

@Getter
@AllArgsConstructor
public enum AccountBizTypeEnum {
    PREPAYMENT(1, "预存款管理"),
    DEPOSIT(2, "押金管理"),
    CASHIER_OFFLINE(3, "收银台线下收费"),
    TEMPORARY(4, "收银台临时收费"),
    BUSINESS(5, "经营性收费"),
    ;

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

}
