import request from '@/core/utils/request'

// 创建
export function create (data) {
  return request.post('/cms/res/group/create', data)
}

// 根据ID删除
export function deleteById (id) {
  return request.get(`/cms/res/group/delete/${id}`)
}

// 批量删除
export function deleteByIdInBatch (ids) {
  return request.get('/cms/res/group/delete/batch', {
    params: {
      ids
    }
  })
}

// 根据ID修改
export function updateById (data) {
  return request.post('/cms/res/group/updateById', data)
}

// 分页查询
export function fetchPage (data) {
  return request.post('/cms/res/group/page', data)
}

// 查询所有
export function fetchAll (data) {
  return request.get('/cms/res/group/all', data)
}
