package com.red.circle.order.inner.endpoint.api;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.order.inner.model.cmd.inapp.InAppPurchaseDetailsQryCmd;
import com.red.circle.order.inner.model.dto.inapp.CountUserInAppPurchaseDTO;
import com.red.circle.order.inner.model.dto.inapp.InAppPurchaseDetailsDTO;
import java.time.LocalDateTime;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 内购详情.
 *
 * @author pengliang on 2023/11/3
 */
public interface InAppPurchaseDetailsClientApi {

  String API_PREFIX = "/in-app-purchase-details/client";


  /**
   * 获取订单信息.
   */
  @GetMapping("/getById")
  ResultResponse<InAppPurchaseDetailsDTO> getById(@RequestParam("id") String id);

  /**
   * 订单信息查询.
   */
  @PostMapping("/list")
  ResultResponse<List<InAppPurchaseDetailsDTO>> list(
      @RequestBody @Validated InAppPurchaseDetailsQryCmd qryCmd);

  /**
   * 统计用户内购.
   */
  @GetMapping("/countUserInAppPurchase")
  ResultResponse<List<CountUserInAppPurchaseDTO>> countUserInAppPurchase(@RequestParam("sysOrigin")String sysOrigin,
      @RequestParam("startTime")LocalDateTime startTime,
      @RequestParam("endTime")LocalDateTime endTime,
      @RequestParam("limit")Integer limit);
}
