package com.gtiit.shr.entity.enums;

public enum OperationEnum {
    ADD("新增", "1"),
    UPDATE("更新", "2");

    private final String name;
    private final String value;

    private OperationEnum(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 OperationEnum fromVal(String val) {
        OperationEnum[] var1 = values();
        int var2 = var1.length;

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

        return ADD;
    }
}
