package shop.alien.store.service;

import shop.alien.entity.store.vo.PlatformShopMembershipOrderCreateResultVo;

import java.util.Optional;

/**
 * 同一门店 + 方案在 15 分钟内重复创建订单时返回缓存结果（不按付款人区分）；支付成功或关单后清除。
 */
public interface PlatformShopMembershipOrderCreateDebounceService {

    Optional<PlatformShopMembershipOrderCreateResultVo> getReusablePendingOrder(Integer storeId, Integer planId);

    void rememberPendingOrder(Integer storeId, Integer planId, PlatformShopMembershipOrderCreateResultVo vo);

    void clearPendingSlot(Integer storeId, Integer planId);
}
