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

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

@Getter
public enum BreachDateTypeEnum {
    RECEIVABLE_DATE(1, "应收日期"),
    START_DATE(2, "账单开始日期"),
    END_DATE(3, "账单截止日期"),
    ;

    private int value;
    private String desc;

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

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

}
