package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumProfitSharingOrderStatus {
    PROFIT_SHARING_UNKNOWN(0, "未知"),
    PROFIT_SHARING_REQ_FAILED(1, "提交订单失败"),
    PROFIT_SHARING_APPLY_FAILED(2, "提交业务失败"),
    PROFIT_SHARING_ACCEPTED(3, "受理成功"),
    PROFIT_SHARING_PROCESSING(4, "处理中"),
    PROFIT_SHARING_DONE(5, "处理完成"),
    PROFIT_SHARING_FAILED(6, "处理失败"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
