package com.yuchen.saas.parking.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *  免费状态 0 免费 1 不免费
 * @author CXJ
 */
@AllArgsConstructor
@Getter
public enum BillStateEnum {


    UN_SETTLED(0, "未结算账单"),
    SETTLED(1, "已结算账单"),
    ;

    private Integer code;

    private String desc;

    public static String getDescByCode(Integer code) {
        BillStateEnum[] enumArray = BillStateEnum.values();
        for (BillStateEnum e : enumArray) {
            if (e.getCode().equals(code)) {
                return e.getDesc();
            }
        }
        return "";
    }
}
