import { request } from "@umijs/max";
import { TradeOrderPageRespVO, TradeReq } from "./list";
import { TradeOrderDetailRespVO } from "./detail";

export const getTradeOrderPage = async (params: TradeReq) => {
  return request<PageResult<TradeOrderPageRespVO[]>>("/trade/order/page", {
    method: "GET",
    params,
  });
};

export const getTradeOrderDetail = async (id: number) => {
  return request<TradeOrderDetailRespVO>("/trade/order/get-detail", {
    method: "GET",
    params: { id },
  });
};

export { TradeOrderPageRespVO, TradeOrderDetailRespVO, TradeReq };
