package com.haha.service;

import com.haha.entity.MarketingActivity;
import com.haha.entity.Order;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface MarketingRuleService {

    BigDecimal calculateDiscount(Long orderId, Long activityId);

    BigDecimal calculateFirstOrderDiscount(Order order, MarketingActivity activity);

    BigDecimal calculateDiscountPrice(Order order, MarketingActivity activity);

    BigDecimal calculateFullReduction(Order order, MarketingActivity activity);

    List<MarketingActivity> getApplicableActivities(Order order);

    boolean isApplicableToShop(MarketingActivity activity, Long shopId);

    boolean isApplicableToDevice(MarketingActivity activity, String deviceId);

    boolean isApplicableToProduct(MarketingActivity activity, Long productId);

    boolean isFirstOrder(Long userId);

    Map<String, Object> calculateOrderDiscount(Order order);
}
