package com.iformall.enums;

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

    // 0为发布成功，1为发布失败
    SUCCESS(0, "发布成功"),
    FAIL(1, "发布失败"),
    BACK(2, "发布回退"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
