package cn.newfeifan.mall.module.distri.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ConsumptionEnum {

    PT_TOP_TUP(1,"平台充值"),
    COMMISSION_TRANSITION(2,"佣金转化为消费分"),
    CONSUMPTION_TRANSFER(3,"消费分转出"),
    CONSUMPTION_RECIPIENT(4,"消费分转入"),
    COMMISSION_WITHDRAWAL(5,"佣金提现"),
    PAY_ORDER(6,"购物支付"),
    REFUND_ORDER(7,"退回退款返回"),
    TOP_UP_GET(8,"充值获得"),
    CANCEL_ORDER_BACK_CONSUMPTION_POINTS(9,"手动取消订单退回消费分"),
    ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL(10,"支付超时退回消费分"),
    ;

    private final Integer type;
    private final String name;

    public static String getName(Integer type){
        for (ConsumptionEnum value : ConsumptionEnum.values()) {
            if(value.getType().equals(type)){
                return value.getName();
            }
        }
        return null;
    }
}
