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

/** 获取学校学院列表 */
export function fetchGetSchoolCollegeList(params?: Api.Art.SchoolCollegeSearchParams) {
  return request<Api.Art.SchoolCollegeList>({
    url: '/art/schoolCollege/list',
    method: 'get',
    params
  });
}
/** 新增学校学院 */
export function fetchCreateSchoolCollege(data: Api.Art.SchoolCollegeOperateParams) {
  return request<boolean>({
    url: '/art/schoolCollege',
    method: 'post',
    data
  });
}

/** 修改学校学院 */
export function fetchUpdateSchoolCollege(data: Api.Art.SchoolCollegeOperateParams) {
  return request<boolean>({
    url: '/art/schoolCollege',
    method: 'put',
    data
  });
}

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