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

const mailTable = (_pageSize) => {
  return [
    {
      id: 91,
      title: '测试邮件4',
      content: '111',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '12',
        },
      ],
      sender: '系统',
      recievers: '3355',
      sendWay: 0,
      sendAt: 1647529320,
      sentAt: 0,
      expired: 15,
      opt: 'draft',
      status: '待发送',
      deleted: false,
    },
    {
      id: 89,
      title: '测试邮件3',
      content: '111',
      type: 0,
      ext: null,
      sender: '系统',
      recievers: '272417',
      sendWay: 0,
      sendAt: 1647482400,
      sentAt: 0,
      expired: 7,
      opt: 'draft',
      status: '待发送',
      deleted: false,
    },
    {
      id: 107,
      title: '新春礼包！',
      content: '新春礼包\n',
      type: 0,
      ext: [
        {
          id: '1002',
          count: '500',
        },
      ],
      sender: '测试',
      recievers: '3355',
      sendWay: 1,
      sendAt: 1650447075,
      sentAt: 1650447075,
      expired: 7,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 105,
      title: '临时更新通知',
      content:
        '尊敬的玩家：\n\t《魔君》将于3月17日11:00-11:10进行临时停机更新，预计维护时间为10分钟，届时将关闭游戏世界，请各位玩家合理安排自己的时间；\n\t\n\t对于停机期间给您带来的不便，请原谅，感谢所有您的支持与合作。\n\t\t\t\n\t\t\t《魔君》全体开发人员\n\t\t\t2022年3月17日',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '10000',
        },
        {
          id: '1002',
          count: '100',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647484865,
      sentAt: 1647484865,
      expired: 7,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 103,
      title: '新春礼包！',
      content: '辞旧迎新，欢度佳节。\n新春大礼包。祝游戏愉快！',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '50000',
        },
        {
          id: '1002',
          count: '5000',
        },
        {
          id: '3001',
          count: '80',
        },
      ],
      sender: '魔君团队',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647484112,
      sentAt: 1647484112,
      expired: 5,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 101,
      title: '新春礼包！',
      content: '辞旧迎新，欢度佳节。\n新春大礼包。祝游戏愉快！',
      type: 0,
      ext: [
        {
          id: '10001',
          count: '10000',
        },
        {
          id: '3001',
          count: '500',
        },
      ],
      sender: '魔君团队',
      recievers: '272422',
      sendWay: 1,
      sendAt: 1647483599,
      sentAt: 1647483599,
      expired: 2,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 99,
      title: '新春礼包！',
      content: '辞旧迎新，欢度佳节。\n新春大礼包。祝游戏愉快！',
      type: 0,
      ext: [
        {
          id: '10001',
          count: '10000',
        },
      ],
      sender: '魔君团队',
      recievers: '272422',
      sendWay: 1,
      sendAt: 1647483514,
      sentAt: 1647483514,
      expired: 2,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 97,
      title: '新春礼包！',
      content: '辞旧迎新，欢度佳节。\n新春大礼包。祝游戏愉快！',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '500000',
        },
        {
          id: '1002',
          count: '50000',
        },
        {
          id: '',
          count: '',
        },
        {
          id: '',
          count: '',
        },
        {
          id: '10001',
          count: '10000',
        },
        {
          id: '1013',
          count: '10',
        },
        {
          id: '1014',
          count: '10',
        },
      ],
      sender: '魔君团队',
      recievers: '272422',
      sendWay: 1,
      sendAt: 1647483213,
      sentAt: 1647483213,
      expired: 1,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 93,
      title: '测试邮件',
      content: '',
      type: 0,
      ext: null,
      sender: '系统',
      recievers: '111',
      sendWay: 0,
      sendAt: 1647532800,
      sentAt: 1647570960,
      expired: 0,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 87,
      title: '测试邮件',
      content: '2222',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '272395',
      sendWay: 1,
      sendAt: 1647434398,
      sentAt: 1647434398,
      expired: 15,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 85,
      title: '补偿222',
      content: '补偿222',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '10000',
        },
      ],
      sender: '系统',
      recievers: '272395',
      sendWay: 1,
      sendAt: 1647433960,
      sentAt: 1647433960,
      expired: 30,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 83,
      title: '补偿',
      content: '补偿',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1000000',
        },
      ],
      sender: '系统',
      recievers: '272395',
      sendWay: 1,
      sendAt: 1647433795,
      sentAt: 1647433795,
      expired: 13,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 81,
      title: '补偿%',
      content: '补偿%',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
        {
          id: '1002',
          count: '1',
        },
        {
          id: '1003',
          count: '1',
        },
        {
          id: '1004',
          count: '1',
        },
        {
          id: '1005',
          count: '1',
        },
        {
          id: '11001',
          count: '5',
        },
        {
          id: '14003',
          count: '30',
        },
        {
          id: '60102017',
          count: '10',
        },
        {
          id: '60103004',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '272395',
      sendWay: 1,
      sendAt: 1647433620,
      sentAt: 1647433620,
      expired: 14,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 79,
      title: 'byq124',
      content: '123',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647432698,
      sentAt: 1647432698,
      expired: 10,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 77,
      title: 'byq123',
      content: '123',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647432615,
      sentAt: 1647432615,
      expired: 10,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 75,
      title: 'byq123',
      content: '123',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647432591,
      sentAt: 1647432591,
      expired: 10,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 73,
      title: 'byq123',
      content: '123',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647432579,
      sentAt: 1647432579,
      expired: 10,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 71,
      title: 'byq123',
      content: '123',
      type: 0,
      ext: [
        {
          id: '1001',
          count: '1',
        },
      ],
      sender: '系统',
      recievers: '全员',
      sendWay: 1,
      sendAt: 1647432529,
      sentAt: 1647432529,
      expired: 10,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 69,
      title: '！#@￥#%#￥%',
      content:
        '~！￥@！#￥@#%……#￥%……￥%\u0026……（）\u0026*（）——*）（）+*）（）%……\u0026%#￥……\u0026@#￥%！#￥  sdef aefas 阿尔泰~',
      type: 0,
      ext: [
        {
          id: '1002',
          count: '3000',
        },
      ],
      sender: '测试',
      recievers: '272412',
      sendWay: 1,
      sendAt: 1647431703,
      sentAt: 1647431703,
      expired: 1,
      opt: 'send',
      status: '已发送',
      deleted: false,
    },
    {
      id: 66,
      title: '测试邮件2',
      content: '1222',
      type: 0,
      ext: [
        {
          id: '1002',
          count: '12',
        },
        {
          id: '1001',
          count: '12',
        },
      ],
      sender: '系统',
      recievers: '272395',
      sendWay: 1,
      sendAt: 1647430881,
      sentAt: 1647430881,
      expired: 14,
      opt: 'draft',
      status: '已发送',
      deleted: false,
    },
  ];
};

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