package com.yunfeiyun.agmp.common.enums;

/**
 * 农事任务提交记录审核状态
 * @author liuyaowen
 * */
public enum TaskrcdAuditStatus {

    UNAUDITED("1", "待审核"),
    PASS("2", "审核通过"),
    NO_PASS("3","审核不通过")
    ;
    private final String code;
    private final String message;

    TaskrcdAuditStatus(String code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public String getCode()
    {
        return code;
    }

    public String getMessage()
    {
        return message;
    }

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

    public static String valueOfCode(String code){
        for(TaskrcdAuditStatus taskrcdAuditStatus: TaskrcdAuditStatus.values()) {
            if(taskrcdAuditStatus.equal(code)){
                return taskrcdAuditStatus.getMessage();
            }
        }
        return "";
    }
}
