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 ExportBillTypeEnum {
    NO_OUT(1, "未出账单导出"),
    ARREARS_FEES(2, "欠费账单导出"),
    ;

    private int value;
    private String desc;

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

}
