import MyTable from "@/components/MyTable";
import React, { FC } from "react";
import clientApi from "@/package/SimpleTrade/api/client";
import { Input } from "antd";

const MT4History: FC = () => {

  const column = [
    {
      title: '订单号',
      dataIndex: 'ticket',
      align: 'center'
    },
    {
      title: '手数',
      dataIndex: 'volume',
      align: 'center'
    },
    {
      title: '开仓价格',
      dataIndex: 'open_price',
      align: 'center'
    },
    {
      title: '开仓时间',
      dataIndex: 'open_time',
      align: 'center'
    },
    {
      title: '平仓价格',
      dataIndex: 'close_price',
      align: 'center'
    },
    {
      title: '平仓时间',
      dataIndex: 'close_time',
      align: 'center'
    },
  ]

  const searchConfigList = [
    {
      key: 'login',
      slot: <Input placeholder="输入MT4账号" allowClear />,
      initialValue: '',
    }
  ]

  return (
    <div>
      <MyTable
        apiFun={clientApi.mt4_history}
        columns={column}
        rowKey="ticket"
        searchConfigList={searchConfigList}
      />
    </div>
  )
}

export default MT4History;