package com.gtiit.shr.entity.enums;

public enum TaskStatusEnum {
    ABLE("可用", "1"),
    ENABLE("禁用", "2");

    private final String name;
    private final String value;

    private TaskStatusEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return this.name;
    }

    public String getValue() {
        return this.value;
    }

    public String toString() {
        return this.name + ":" + this.value;
    }

    public static TaskStatusEnum fromVal(String val) {
        TaskStatusEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            TaskStatusEnum status = var1[var3];
            if (val.equals(status.getValue())) {
                return status;
            }
        }

        return ENABLE;
    }
}
