package com.yunfeiyun.agmp.common.enums;


public enum ChangeApplyAuditStatus {

    UNAUDITED("1", "未审批"),
    PASS("2", "审批通过"),
    NO_PASS("3","审批拒绝")
    ;
    private final String code;
    private final String label;

    ChangeApplyAuditStatus(String code, String label)
    {
        this.code = code;
        this.label = label;
    }

    public String getCode()
    {
        return code;
    }

    public String getLabel()
    {
        return label;
    }

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

    public static String valueOfCode(String code){
        for(ChangeApplyAuditStatus changeApplyAuditStatus : ChangeApplyAuditStatus.values()) {
            if(changeApplyAuditStatus.equal(code)){
                return changeApplyAuditStatus.getLabel();
            }
        }
        return "";
    }
}
