import request from '@/utils/request'

// 承包商
// 查询列表
export function queryContractorList(query) {
  return request({
    url: '/doubledefense/contractor/list',
    method: 'get',
    params: query
  })
}
// 删除数据
export function delContractor(ids) {
  return request({
    url: `/doubledefense/contractor/${ids}`,
    method: 'delete'
  })
}
// 修改
export function editContractor(data) {
  return request({
    url: '/doubledefense/contractor',
    method: 'put',
    data
  })
}
// 获取详细信息
export function getContractorDetails(id) {
  return request({
    url: `/doubledefense/contractor/${id}`,
    method: 'get'
  })
}
// 新增
export function addContractor(data) {
  return request({
    url: '/doubledefense/contractor',
    method: 'post',
    data
  })
}


// 承包商工种
// 查询列表
export function queryProfessionList(query) {
  return request({
    url: '/doubledefense/profession/list',
    method: 'get',
    params: query
  })
}
// 删除数据
export function delProfession(ids) {
  return request({
    url: `/doubledefense/profession/${ids}`,
    method: 'delete'
  })
}
// 修改
export function editProfession(data) {
  return request({
    url: '/doubledefense/profession',
    method: 'put',
    data
  })
}
// 获取详细信息
export function getProfessionDetails(id) {
  return request({
    url: `/doubledefense/profession/${id}`,
    method: 'get'
  })
}
// 新增
export function addProfession(data) {
  return request({
    url: '/doubledefense/profession',
    method: 'post',
    data
  })
}


// 承包商用户
// 查询列表
export function queryUserList(query) {
  return request({
    url: '/doubledefense/user/list',
    method: 'get',
    params: query
  })
}
// 删除数据
export function delUser(ids) {
  return request({
    url: `/doubledefense/user/${ids}`,
    method: 'delete'
  })
}
// 修改
export function editUser(data) {
  return request({
    url: '/doubledefense/user',
    method: 'put',
    data
  })
}
// 获取详细信息
export function getUserDetails(id) {
  return request({
    url: `/doubledefense/user/${id}`,
    method: 'get'
  })
}
// 新增
export function addUser(data) {
  return request({
    url: '/doubledefense/user',
    method: 'post',
    data
  })
}
