package com.qmth.sop.common.enums;

/**
 * @Description: 处理时限枚举
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2023/10/14
 */
public enum ProcessLimitedEnum {

    PROJECT_KEY_INFO_DATE("project_key_info_date", "项目关键信息提交截止时间"),

    APPROVE_RADIO("approve_radio", "内审"),

    SCAN_START_TIME("scan_start_time", "扫描开始时间"),

    SCAN_END_TIME("scan_end_time", "扫描结束时间"),

    MARK_START_TIME("mark_start_time", "评卷开始时间"),

    MARK_END_TIME("mark_end_time", "评卷结束时间"),

    SERVICE_FINISH_PLAN_DATE("service_finish_plan_date", "现场服务完成撤场计划时间"),

    SERVICE_FINISH_PLAN_BEGIN_DATE("service_finish_plan_begin_date", "现场服务完成进场计划时间"),

    ENV_DEPLOYMENT_TIME("env_deployment_time", "环境部署时间");

    private String key;

    private String title;

    private ProcessLimitedEnum(String key, String title) {
        this.key = key;
        this.title = title;
    }

    /**
     * 根据key查找枚举类
     *
     * @param key
     * @return
     */
    public static ProcessLimitedEnum convertKeyToEnum(String key) {
        ProcessLimitedEnum res = null;
        for (ProcessLimitedEnum value : ProcessLimitedEnum.values()) {
            if (key.equals(value.getKey())) {
                res = value;
            }
        }
        return res;
    }

    public String getKey() {
        return key;
    }

    public String getTitle() {
        return title;
    }
}
