import { h } from 'vue';
import { NTag } from 'naive-ui';

export const columns = [
  {
    title: '序号',
    dataIndex: 'id',
    key: 'id',
  },
  {
    title: '玩家ID',
    dataIndex: 'playerID',
    key: 'playerID',
  },
  {
    title: '金额(元)',
    dataIndex: 'amount',
    key: 'amount',
  },
  {
    title: '支付时间',
    dataIndex: 'createAt',
    key: 'createAt',
  },
  {
    title: '状态',
    dataIndex: 'status',
    key: 'status',
    render(row) {
      return h(
        NTag,
        {
          style: {
            marginRight: '6px',
          },
          type: row.status === 1 ? 'info' : 'error',
          bordered: false,
        },
        {
          default: () => (row.status === 1 ? '已支付' : '未支付'),
        }
      );
    },
  },
  {
    title: '平台',
    dataIndex: 'platform',
    key: 'platform',
  },
];
