package com.jsowell.common.enums.AgentDev;

import com.jsowell.common.enums.uniapp.BalanceChangesEnum;

/**
 * 审核状态enum
 *
 * @author Lemon
 * @Date 2023/8/1 9:43
 */
public enum AuditStatusEnum {
    AUDIT_SUCCESS(0, "审核成功"),
    AUDIT_REFUSE(1, "审核被拒绝"),
    AUDIT_IN_PROGRESS(2, "审核中"),
    AUDIT_REVOCATION(3, "已撤回"),
    AUDIT_DELAYED(4, "审核延后"),

    ;

    private int code;
    private String value;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    AuditStatusEnum(int value, String label) {
        this.code = value;
        this.value = label;
    }

    /**
     * 根据code获取value
     * @param code
     * @return
     */
    public static String getValueByCode(int code) {
        for (AuditStatusEnum item : AuditStatusEnum.values()) {
            if (item.getCode() == code) {
                return item.getValue();
            }
        }
        return null;
    }
}
