import { request } from '@/service/request';

/** 获取学校校区列表 */
export function fetchGetSchoolCampusList(params?: Api.Art.SchoolCampusSearchParams) {
  return request<Api.Art.SchoolCampusList>({
    url: '/art/schoolCampus/list',
    method: 'get',
    params
  });
}
/** 新增学校校区 */
export function fetchCreateSchoolCampus(data: Api.Art.SchoolCampusOperateParams) {
  return request<boolean>({
    url: '/art/schoolCampus',
    method: 'post',
    data
  });
}

/** 修改学校校区 */
export function fetchUpdateSchoolCampus(data: Api.Art.SchoolCampusOperateParams) {
  return request<boolean>({
    url: '/art/schoolCampus',
    method: 'put',
    data
  });
}

/** 批量删除学校校区 */
export function fetchBatchDeleteSchoolCampus(campusIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/schoolCampus/${campusIds.join(',')}`,
    method: 'delete'
  });
}
