import Mock from 'mockjs'
import { MockMethod } from 'vite-plugin-mock'

const mockMethodSix: MockMethod[] = [
  {
    url: '/mock/api/six',
    method: 'get',
    timeout: 1000,
    response: () => {
      return {
        code: '0',
        ...Mock.mock({
          'charts|2-3': [
            {
              name: '@pick(["102241","5748512","1024541"])',
              'value|7': ['@float(5, 30, 0, 1, 26, 13, 8, 16)']
            }
          ]
        }),
        ...Mock.mock({
          'dataTable|10-15': [
            {
              id: '@id',
              name: '@goods("name")',
              type: '@unit',
              profession: '@foreignTrade'
            }
          ]
        })
      }
    }
  }
]

export default mockMethodSix
