package com.jeesharp.business.modules.mall.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 售后退款触发模式：审核通过后自动发起微信退款，或运营手动触发。
 *
 * @author jeesharp
 * @since 2026-06-11
 */
@Getter
@AllArgsConstructor
public enum AfterSaleRefundTriggerModeEnum {

    AUTO("AUTO", "审核通过自动退款"),
    MANUAL("MANUAL", "运营手动发起退款");

    private final String value;
    private final String desc;

    public static AfterSaleRefundTriggerModeEnum fromValue(String value) {
        if (value == null) {
            return null;
        }
        for (AfterSaleRefundTriggerModeEnum e : values()) {
            if (e.value.equalsIgnoreCase(value.trim())) {
                return e;
            }
        }
        return null;
    }
}
