package com.yunfeiyun.agmp.common.enums;

public enum FmsMessageResVoType {
    WARN("warn","农事预警"),
    TASK("task","农事审核"),
    CHANGE("change","农资审核"),
    PICK("pick","采收审核"),
    PATROL("patrol","巡田审核")
    ;
    private final String type;
    private final String title;

    FmsMessageResVoType(String type, String title)
    {
        this.type = type;
        this.title = title;
    }

    public String getType()
    {
        return type;
    }

    public String getTitle()
    {
        return title;
    }

    public static String valueOfType(String type){
        for(FmsMessageResVoType fmsMessageResVoType: FmsMessageResVoType.values()) {
            if(fmsMessageResVoType.equal(type)){
                return fmsMessageResVoType.getTitle();
            }
        }
        return "";
    }

    public boolean equal(String type){
        return this.type.equals(type);
    }
}
