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

/** 获取学校媒体资源列表 */
export function fetchGetSchoolMediaList(params?: Api.Art.SchoolMediaSearchParams) {
  return request<Api.Art.SchoolMediaList>({
    url: '/art/schoolMedia/list',
    method: 'get',
    params
  });
}
/** 新增学校媒体资源 */
export function fetchCreateSchoolMedia(data: Api.Art.SchoolMediaOperateParams) {
  return request<boolean>({
    url: '/art/schoolMedia',
    method: 'post',
    data
  });
}

/** 修改学校媒体资源 */
export function fetchUpdateSchoolMedia(data: Api.Art.SchoolMediaOperateParams) {
  return request<boolean>({
    url: '/art/schoolMedia',
    method: 'put',
    data
  });
}

/** 批量删除学校媒体资源 */
export function fetchBatchDeleteSchoolMedia(mediaIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/schoolMedia/${mediaIds.join(',')}`,
    method: 'delete'
  });
}
