package com.qmth.sop.common.enums;

import java.util.Objects;

/**
 * @Description: 服务范围enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2024/5/14
 */
public enum ServiceScopeEnum {
    SCAN("仅扫描"),

    SCAN_MARK("扫描+阅卷"),

    CLOUD_MARK("研究生阅卷");

    ServiceScopeEnum(String title) {
        this.title = title;
    }

    private final String title;

    public String getTitle() {
        return title;
    }

    /**
     * 状态转换 toName
     *
     * @param title
     * @return
     */
    public static ServiceScopeEnum convertToName(String title) {
        for (ServiceScopeEnum e : ServiceScopeEnum.values()) {
            if (Objects.equals(title, e.getTitle())) {
                return e;
            }
        }
        return null;
    }
}
