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

const chapterDailyStatistics = (_pageSize) => {
  return [
    {
      key: 251,
      date: '2022-07-31',
      new_count: 4288,
      active_count: 5981,
      new_duration: 1511415,
      active_duration: 6125861,
      day_1_active: 0,
      day_2_active: 0,
      day_3_active: 0,
      day_4_active: 0,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 250,
      date: '2022-07-30',
      new_count: 1880,
      active_count: 3459,
      new_duration: 611829,
      active_duration: 4734212,
      day_1_active: 89,
      day_2_active: 0,
      day_3_active: 0,
      day_4_active: 0,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 249,
      date: '2022-07-29',
      new_count: 3669,
      active_count: 5463,
      new_duration: 1240405,
      active_duration: 5327239,
      day_1_active: 113,
      day_2_active: 76,
      day_3_active: 0,
      day_4_active: 0,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 248,
      date: '2022-07-28',
      new_count: 6230,
      active_count: 8116,
      new_duration: 1961065,
      active_duration: 5974477,
      day_1_active: 232,
      day_2_active: 129,
      day_3_active: 101,
      day_4_active: 0,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 247,
      date: '2022-07-27',
      new_count: 5182,
      active_count: 6999,
      new_duration: 1490220,
      active_duration: 5854687,
      day_1_active: 242,
      day_2_active: 114,
      day_3_active: 64,
      day_4_active: 56,
      day_5_active: 0,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 246,
      date: '2022-07-26',
      new_count: 4270,
      active_count: 6066,
      new_duration: 1313547,
      active_duration: 5683137,
      day_1_active: 206,
      day_2_active: 97,
      day_3_active: 65,
      day_4_active: 43,
      day_5_active: 45,
      day_6_active: 0,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 245,
      date: '2022-07-25',
      new_count: 4617,
      active_count: 6463,
      new_duration: 1379612,
      active_duration: 6184500,
      day_1_active: 183,
      day_2_active: 94,
      day_3_active: 72,
      day_4_active: 62,
      day_5_active: 50,
      day_6_active: 49,
      day_7_active: 0,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 244,
      date: '2022-07-24',
      new_count: 6935,
      active_count: 8965,
      new_duration: 1940360,
      active_duration: 6480660,
      day_1_active: 230,
      day_2_active: 133,
      day_3_active: 91,
      day_4_active: 78,
      day_5_active: 56,
      day_6_active: 54,
      day_7_active: 53,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 243,
      date: '2022-07-23',
      new_count: 6675,
      active_count: 8652,
      new_duration: 1999656,
      active_duration: 6536063,
      day_1_active: 276,
      day_2_active: 138,
      day_3_active: 96,
      day_4_active: 73,
      day_5_active: 80,
      day_6_active: 58,
      day_7_active: 51,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 242,
      date: '2022-07-22',
      new_count: 5074,
      active_count: 6958,
      new_duration: 1688520,
      active_duration: 6394616,
      day_1_active: 219,
      day_2_active: 112,
      day_3_active: 81,
      day_4_active: 66,
      day_5_active: 47,
      day_6_active: 54,
      day_7_active: 29,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 241,
      date: '2022-07-21',
      new_count: 4232,
      active_count: 6071,
      new_duration: 1555398,
      active_duration: 7808954,
      day_1_active: 189,
      day_2_active: 117,
      day_3_active: 74,
      day_4_active: 61,
      day_5_active: 42,
      day_6_active: 60,
      day_7_active: 45,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 240,
      date: '2022-07-20',
      new_count: 5033,
      active_count: 6985,
      new_duration: 1923512,
      active_duration: 7288332,
      day_1_active: 223,
      day_2_active: 129,
      day_3_active: 94,
      day_4_active: 84,
      day_5_active: 53,
      day_6_active: 52,
      day_7_active: 54,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 239,
      date: '2022-07-19',
      new_count: 5298,
      active_count: 7248,
      new_duration: 1800154,
      active_duration: 6555523,
      day_1_active: 237,
      day_2_active: 118,
      day_3_active: 84,
      day_4_active: 77,
      day_5_active: 69,
      day_6_active: 53,
      day_7_active: 38,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 238,
      date: '2022-07-18',
      new_count: 6477,
      active_count: 8413,
      new_duration: 2167279,
      active_duration: 6751539,
      day_1_active: 270,
      day_2_active: 177,
      day_3_active: 123,
      day_4_active: 105,
      day_5_active: 84,
      day_6_active: 73,
      day_7_active: 69,
      day_14_active: 0,
      day_30_active: 0,
    },
    {
      key: 237,
      date: '2022-07-17',
      new_count: 8620,
      active_count: 10694,
      new_duration: 2247755,
      active_duration: 6733270,
      day_1_active: 259,
      day_2_active: 157,
      day_3_active: 106,
      day_4_active: 86,
      day_5_active: 71,
      day_6_active: 69,
      day_7_active: 71,
      day_14_active: 39,
      day_30_active: 0,
    },
    {
      key: 236,
      date: '2022-07-16',
      new_count: 8510,
      active_count: 10508,
      new_duration: 2327906,
      active_duration: 6635903,
      day_1_active: 334,
      day_2_active: 148,
      day_3_active: 107,
      day_4_active: 85,
      day_5_active: 77,
      day_6_active: 64,
      day_7_active: 62,
      day_14_active: 36,
      day_30_active: 0,
    },
    {
      key: 235,
      date: '2022-07-15',
      new_count: 7888,
      active_count: 9763,
      new_duration: 2178898,
      active_duration: 6743220,
      day_1_active: 305,
      day_2_active: 180,
      day_3_active: 127,
      day_4_active: 93,
      day_5_active: 77,
      day_6_active: 67,
      day_7_active: 63,
      day_14_active: 32,
      day_30_active: 0,
    },
    {
      key: 234,
      date: '2022-07-14',
      new_count: 5577,
      active_count: 7253,
      new_duration: 1827386,
      active_duration: 6284070,
      day_1_active: 256,
      day_2_active: 140,
      day_3_active: 100,
      day_4_active: 76,
      day_5_active: 59,
      day_6_active: 61,
      day_7_active: 40,
      day_14_active: 39,
      day_30_active: 0,
    },
    {
      key: 233,
      date: '2022-07-13',
      new_count: 581,
      active_count: 1609,
      new_duration: 395722,
      active_duration: 5181497,
      day_1_active: 54,
      day_2_active: 31,
      day_3_active: 21,
      day_4_active: 23,
      day_5_active: 17,
      day_6_active: 16,
      day_7_active: 16,
      day_14_active: 4,
      day_30_active: 0,
    },
  ];
};

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