package com.younike.system.enums;

import com.younike.common.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 优金豆积分变动code枚举类
 */
@AllArgsConstructor
@Getter
public enum BeanPointCodeEnum {

    CONSUME("001", "消费"),
    REFUNDS("002", "退款"),
    DEDUCTIONS("003", "抵扣"),
    ORDER_COMMENT("004", "评价订单新增"),
    REFUND_ROLLBACK("005", "退款回滚");

    private String code;

    private String desc;

    public static String getDescription(String code) {
        for (BeanPointCodeEnum item : BeanPointCodeEnum.values()) {
            if(item.getCode().equals(code)){
                return item.getDesc();
            }
        }
        return StringUtils.EMPTY;
    }
}
