package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumProfitSharingOrderType {
    PROFIT_SHARING_SINGLE(0, "单次分账"),
    PROFIT_SHARING_MULTI(1, "多次分账"),
    PROFIT_SHARING_MULTI_FINISH(2, "多次分账完结"),
    PROFIT_SHARING_SINGLE_FINISH(3, "单次分账完结"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
