package com.qmth.exam.reserve.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CategoryLevel {

    CITY(1, "第一层级"),

    TEACHING(2, "第二层级");

    private Integer value;
    private String name;

    public static CategoryLevel getByName(String name) {
        for (CategoryLevel r : CategoryLevel.values()) {
            if (r.getName().equals(name)) {
                return r;
            }
        }
        return null;
    }

}
