import { timestampToTime } from '@/utils/dateUtil';

const types = {
  1: '材料',
  2: '装备',
  3: '钻石',
  4: '金币',
};

export const columns = [
  {
    title: '序号',
    dataIndex: 'id',
    key: 'id',
    width: 80,
  },
  {
    title: '服务器',
    dataIndex: 'server',
    key: 'server',
    width: 100,
  },
  {
    title: '玩家ID',
    dataIndex: 'playerid',
    key: 'playerid',
    width: 100,
  },
  {
    title: 'openid',
    dataIndex: 'type',
    key: 'type',
    render(row) {
      return row.openid;
    },
    width: 200,
  },
  {
    title: '领取时间',
    dataIndex: 'created_at',
    key: 'created_at',
    render: (rows, _) => {
      return timestampToTime(rows.created_at);
    },
    width: 150,
  },
];
