const services = [
  {
    id: 1,
    serviceName: '金融风控_1',
    version: '0.0.1',
    modelName: '金融风控_1',
    modelVersionId: 1,
    status: 1,
    createTime: 1593321093655,
    updateTime: 1593321093655
  },
  {
    id: 2,
    serviceName: '金融风控_2',
    version: '0.0.2',
    modelName: '金融风控_2',
    modelVersionId: 2,
    status: 2,
    createTime: 1593321093655,
    updateTime: 1593321093655
  }
]
export default [
  // 获取服务列表
  {
    url: '/cc/linque/getServiceListByModelVersion',
    type: 'post',
    response: _ => {
      return {
        code: 200,
        message: 'success',
        responseTime: 1593321093655,
        data: services
      }
    }
  },
  // 获取服务列表-分页
  {
    url: '/cc/linque/getServiceList',
    type: 'post',
    response: _ => {
      return {
        code: 200,
        message: 'success',
        responseTime: 1593321093655,
        data: {
          pageNum: 1,
          pageSize: 10,
          totalSize: services.length,
          records: services
        }
      }
    }
  },
  // 删除服务
  {
    url: '/cc/linque/deleteService',
    type: 'post',
    response: (req, res) => {
      const index = services.findIndex(item => req.body.id === item.id)
      services.splice(index, 1)
      return {
        code: 200,
        message: 'success',
        responseTime: 1593321093655,
        data: {}
      }
    }
  },
  // 创建服务
  {
    url: '/cc/linque/createService',
    type: 'post',
    response: (req, res) => {
      return {
        code: 200,
        message: 'success',
        responseTime: 1593321093655,
        data: {}
      }
    }
  }
]
