package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumProfitSharingResultStatus {
    PROFIT_SHARING_UNKNOWN(-1, "未知"),
    PROFIT_SHARING_RESULT_PENDING(1, "待分账"),
    PROFIT_SHARING_RESULT_SUCCESS(2, "分账成功"),
    PROFIT_SHARING_RESULT_ADJUST(3, "分账失败待调账"),
    PROFIT_SHARING_RESULT_RETURNED(4, "已转回分账方"),
    PROFIT_SHARING_RESULT_CLOSED(5, "已关闭"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
