package com.qmth.exam.reserve.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum EventType {

    CANCEL_APPLY("取消预约"),

    DELETE_APPLY("删除预约"),

    SAVE_TIME_PERIOD("保存编辑考试时段"),

    SAVE_NOTICE("保存编辑考试时段"),

    ENABLE_APPLY_TASK("开启禁用预约任务");

    private String name;

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