package com.ylx.order.enums;

import com.ylx.point.enums.PointActivityTypeEnum;
import lombok.Getter;

@Getter
public enum AfterSaleServiceStatusEnum {

    PENDING_AUDIT(0, "待审核"),
    APPROVED(1, "审核通过(退款中)"),
    REJECTED(2, "审核拒绝"),
    REFUND_SUCCESS(3, "退款成功"),
    REFUND_FAILED(4, "退款失败");

    private final Integer code;
    private final String desc;

    AfterSaleServiceStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AfterSaleServiceStatusEnum valueOf(Integer code) {
        if (code == null) {
            return null;
        }
        for (AfterSaleServiceStatusEnum value : AfterSaleServiceStatusEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

}
