import { resultSuccess } from '../_util';

const chapterFirstDay = (_pageSize) => {
  return [
    {
      key: 2,
      room_id: 1,
      count: 3213,
      settle_count: 0,
    },
    {
      key: 3,
      room_id: 2,
      count: 2468,
      settle_count: 0,
    },
    {
      key: 4,
      room_id: 3,
      count: 2163,
      settle_count: 0,
    },
    {
      key: 5,
      room_id: 4,
      count: 2009,
      settle_count: 0,
    },
    {
      key: 6,
      room_id: 5,
      count: 1735,
      settle_count: 0,
    },
    {
      key: 7,
      room_id: 6,
      count: 1553,
      settle_count: 0,
    },
    {
      key: 8,
      room_id: 7,
      count: 1375,
      settle_count: 0,
    },
    {
      key: 9,
      room_id: 8,
      count: 1359,
      settle_count: 0,
    },
    {
      key: 10,
      room_id: 9,
      count: 1285,
      settle_count: 1229,
    },
  ];
};

export default [
  {
    url: '/api/echarts/chapterFirstDay',
    timeout: 1,
    method: 'get',
    response: ({ query }) => {
      const { page = 1, pageSize = 10 } = query;
      const list = chapterFirstDay(Number(pageSize));
      return resultSuccess({
        page: Number(page),
        pageSize: Number(pageSize),
        pageCount: 1,
        list,
      });
    },
  },
];
