import { request } from '../request';

// 查询模型配置列表 "service:modelConfig:list"
export function fetchModelConfigList(params?: Api.ModelConfig.ContractModelConfigSearchParams) {
  return request<Api.ModelConfig.ContractModelConfigList>({
    url: `/api/service/modelConfig/list`,
    method: 'get',
    params
  });
}

// 获取模型配置详细信息 "service:modelConfig:query"
export function fetchModelConfigDetail(id: string) {
  return request<Api.ModelConfig.ContractModelConfigVo>({
    url: `/api/service/modelConfig/${id}`,
    method: 'get'
  });
}

// 新增模型配置 "service:modelConfig:add"
export function createModelConfig(data: Api.ModelConfig.ContractModelConfigVo) {
  return request({
    url: `/api/service/modelConfig`,
    method: 'post',
    data
  });
}

// 删除模型配置 "service:modelConfig:remove"
export function deleteModelConfig(ids: Api.ModelConfig.ContractModelConfigVo['id'][]) {
  return request({
    url: `/api/service/modelConfig/${ids}`,
    method: 'delete'
  });
}

// 修改模型配置 "service:modelConfig:edit"
export function updateModelConfig(data: Api.ModelConfig.ContractModelConfigVo) {
  return request({
    url: `/api/service/modelConfig`,
    method: 'put',
    data
  });
}
