import request from '@/utils/request'

// 查询民主生活会列表
export function listDemocratic(query) {
  return request({
    url: '/branch/democratic/list',
    method: 'get',
    params: query
  })
}

// 查询民主生活会详细
export function getDemocratic(democraticId) {
  return request({
    url: '/branch/democratic/' + democraticId,
    method: 'get'
  })
}

// 新增民主生活会
export function addDemocratic(data) {
  return request({
    url: '/branch/democratic',
    method: 'post',
    data: data
  })
}

// 修改民主生活会
export function updateDemocratic(data) {
  return request({
    url: '/branch/democratic',
    method: 'put',
    data: data
  })
}

// 删除民主生活会
export function delDemocratic(democraticId) {
  return request({
    url: '/branch/democratic/' + democraticId,
    method: 'delete'
  })
}
