package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumWeappAuditStatus {

    // 0为审核成功，1为审核失败，2为审核中，3已撤回
    SUCCESS(0, "审核成功"),
    FAIL(1, "审核失败"),
    AUDITING(2, "审核中"),
    UNDO(3, "已撤回"),
    ;

    public static EnumWeappAuditStatus getEnum(Integer code) {
        for (EnumWeappAuditStatus value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
