import request from '@/utils/request'

// 查询用户和角色关联列表
export function listCompanyUserRole(query) {
  return request({
    url: '/company/companyUserRole/list',
    method: 'get',
    params: query
  })
}

// 查询用户和角色关联详细
export function getCompanyUserRole(userId) {
  return request({
    url: '/company/companyUserRole/' + userId,
    method: 'get'
  })
}

// 新增用户和角色关联
export function addCompanyUserRole(data) {
  return request({
    url: '/company/companyUserRole',
    method: 'post',
    data: data
  })
}

// 修改用户和角色关联
export function updateCompanyUserRole(data) {
  return request({
    url: '/company/companyUserRole',
    method: 'put',
    data: data
  })
}

// 删除用户和角色关联
export function delCompanyUserRole(userId) {
  return request({
    url: '/company/companyUserRole/' + userId,
    method: 'delete'
  })
}

// 导出用户和角色关联
export function exportCompanyUserRole(query) {
  return request({
    url: '/company/companyUserRole/export',
    method: 'get',
    params: query
  })
}