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 RefundBizTypeEnum {
    DEPOSIT(1, "押金退款"),
    BEFOREHAND(2, "预存款退款"),

    ;

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

}
