import { timestampToTime } from '@/utils/dateUtil';
import {getDifficultName} from "@/utils/index";

export const columns = [
  {
    title: '记录ID',
    dataIndex: 'id',
    key: 'id',
  },
  {
    title: '埋点ID',
    dataIndex: 'event_id',
    key: 'event_id',
  },
  {
    title: '关卡ID',
    dataIndex: 'chapter_id',
    key: 'chapter_id',
  },
  {
    title: '房间ID',
    dataIndex: 'room_id',
    key: 'room_id',
  },
  {
    title: '困难度',
    dataIndex: 'difficulty',
    key: 'difficulty',
    render: (rows, _) => {
      return getDifficultName(rows.difficulty);
    },
  },
  {
    title: '数据参数',
    dataIndex: 'extra',
    key: 'extra',
    render(row) {
      return row.extra;
    },
  },
  {
    title: '上报时间',
    dataIndex: 'event_at',
    key: 'event_at',
    render: (rows, _) => {
      return timestampToTime(rows.event_at);
    },
  },
];
