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 ReadJustTypeEnum {
    ARREARS(1, "欠费调整"),
    BREACH(2, "滞纳金调整"),
    ;

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