package com.younike.system.enums;

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

/**
 * 订单退款状态枚举类
 */
@AllArgsConstructor
@Getter
public enum OrderRefundStateEnum {

    PLATFORM_INTERVENTION("001", "平台介入"),
    MERCHANT_REFUNDS("002", "商家退款"),
    PLATFORM_REJECTS("003", "平台驳回"),
    PLATFORM_REFUNDS("004", "平台退款");

    private String code;

    private String desc;

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