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

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

@Getter
public enum BilDateEnum {
    START_DATE(1, "账单开始时间"),
    END_DATE(2, "账单结束时间"),
    ;

    private final int value;
    private final String desc;

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

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