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

/** 获取艺术专业库列表 */
export function fetchGetMajorList(params?: Api.Art.MajorSearchParams) {
  return request<Api.Art.MajorList>({
    url: '/art/major/list',
    method: 'get',
    params
  });
}
/** 新增艺术专业库 */
export function fetchCreateMajor(data: Api.Art.MajorOperateParams) {
  return request<boolean>({
    url: '/art/major',
    method: 'post',
    data
  });
}

/** 修改艺术专业库 */
export function fetchUpdateMajor(data: Api.Art.MajorOperateParams) {
  return request<boolean>({
    url: '/art/major',
    method: 'put',
    data
  });
}

/** 批量删除艺术专业库 */
export function fetchBatchDeleteMajor(majorIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/major/${majorIds.join(',')}`,
    method: 'delete'
  });
}
