{"size": 1194, "ext": "js", "max_stars_repo_path": "mock/table.js", "max_stars_repo_name": "hyleeon/myvue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "mock/table.js", "max_issues_repo_name": "hyleeon/myvue", "max_issues_repo_issues_event_min_datetime": "2021-03-10T03:00:08.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T21:47:35.000Z", "max_forks_repo_path": "mock/table.js", "max_forks_repo_name": "hyleeon/myvue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 18.3692307692, "max_line_length": 50, "alphanum_fraction": 0.472361809}
import Mock from 'mockjs'

const data = Mock.mock({
  'items|30': [{
    id: '@id',
    title: '@sentence(10, 20)',
    'status|1': ['published', 'draft', 'deleted'],
    author: 'name',
    display_time: '@datetime',
    pageviews: '@integer(300, 5000)'
  }],
  'approvalFlowList|25': [{
    id: '@integer(0, 500000000)',
    name: '@cword(6,20)',
    desc: '@sentence(20, 40)',
    flow: '@sentence(10, 20)',
    notifiers: '@sentence(3, 10)',
    author: '@word(5,8)'
  }]
})

export default [
  {
    url: '/table/list',
    type: 'get',
    response: config => {
      const items = data.items
      items[0]
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  },
  {
    url: '/table/approval_flow_list',
    type: 'get',
    response: config => {
      const items = data.approvalFlowList
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  },
  {
    url: '/table/set_approval_flow',
    type: 'post',
    response: config => {
      return {
        code: 0,
        data: {
          msg: 'ok'
        }
      }
    }
  }
]
