import apiRequest from '@/network/http/apiRequest'

/**
 * 根据ID获取
 * @returns
 * @param gmpgId
 */
export function getGrantGroupById(gmpgId: number) {
  return apiRequest({
    url: `/group/member/grant/${gmpgId}`,
    method: 'GET',
  })
}

/**
 * 添加部门类别
 * @param data
 * @returns
 */
export function createGrantGroup(data: any) {
  return apiRequest({
    url: '/group/member/grant/add',
    method: 'POST',
    data,
  })
}

/**
 * 添加部门类别
 * @param data
 * @returns
 */
export function updateGrantGroup(data: any) {
  return apiRequest({
    url: '/group/member/grant/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除部门类别
 * @returns
 * @param gmpgId
 */
export function deleteGrantGroup(gmpgId: number) {
  return apiRequest({
    url: `/group/member/grant/${gmpgId}`,
    method: 'DELETE',
  })
}
