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

/** 获取校区宿舍条件列表 */
export function fetchGetSchoolDormList(params?: Api.Art.SchoolDormSearchParams) {
  return request<Api.Art.SchoolDormList>({
    url: '/art/schoolDorm/list',
    method: 'get',
    params
  });
}
/** 新增校区宿舍条件 */
export function fetchCreateSchoolDorm(data: Api.Art.SchoolDormOperateParams) {
  return request<boolean>({
    url: '/art/schoolDorm',
    method: 'post',
    data
  });
}

/** 修改校区宿舍条件 */
export function fetchUpdateSchoolDorm(data: Api.Art.SchoolDormOperateParams) {
  return request<boolean>({
    url: '/art/schoolDorm',
    method: 'put',
    data
  });
}

/** 批量删除校区宿舍条件 */
export function fetchBatchDeleteSchoolDorm(dormIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/schoolDorm/${dormIds.join(',')}`,
    method: 'delete'
  });
}
