import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listSource(query) {
  return request({
    url: '/etl/source/list',
    method: 'get',
    params: query
  })
}

export function statisticsInfo(){
  return request({
    url: '/etl/source/Statistics',
    method: 'get'
  })
}

export function dataAssetList(data) {
  return request({
    url: '/etl/source/DataAssetList',
    method: 'post',
    data
  })
}

export function assetModelList(data) {
  return request({
    url: '/etl/source/AssetModelList',
    method: 'post',
    data
  })
}

export function assetsList(data) {
  return request({
    url: '/etl/source/AssetsList',
    method: 'post',
    data
  })
}

export function synchronousData(data) {
  return request({
    url: '/etl/source/SynchronousData',
    method: 'post',
    data
  })
}

export function structureList(data) {
  return request({
    url: '/etl/source/StructureList',
    method: 'post',
    data
  })
}

// 查询【请填写功能名称】详细
export function getSource(id) {
  return request({
    url: '/etl/source/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addSource(data) {
  return request({
    url: '/etl/source',
    method: 'post',
    data: data
  })
}

// 测试连接
export function testConnection(data) {
  return request({
    url: '/etl/source/TestConnection',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateSource(data) {
  return request({
    url: '/etl/source',
    method: 'put',
    data: data
  })
}

// 修改字段数据
export function updateAssetModel(data) {
  return request({
    url: '/etl/model/UpdateAssetModel',
    method: 'post',
    data: data
  })
}

// 删除【请填写功能名称】
export function delSource(id) {
  return request({
    url: '/etl/source/' + id,
    method: 'delete'
  })
}

// 查询数据字段列表
export function listModel(data) {
  return request({
    url: '/etl/model/list',
    method: 'post',
    data: data
  })
}
