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

/** 获取院校招录专业列表 */
export function fetchGetSchoolRecruitMajorList(params?: Api.Art.SchoolRecruitMajorSearchParams) {
  return request<Api.Art.SchoolRecruitMajorList>({
    url: '/art/schoolRecruitMajor/list',
    method: 'get',
    params
  });
}
/** 新增院校招录专业 */
export function fetchCreateSchoolRecruitMajor(data: Api.Art.SchoolRecruitMajorOperateParams) {
  return request<boolean>({
    url: '/art/schoolRecruitMajor',
    method: 'post',
    data
  });
}

/** 修改院校招录专业 */
export function fetchUpdateSchoolRecruitMajor(data: Api.Art.SchoolRecruitMajorOperateParams) {
  return request<boolean>({
    url: '/art/schoolRecruitMajor',
    method: 'put',
    data
  });
}

/** 批量删除院校招录专业 */
export function fetchBatchDeleteSchoolRecruitMajor(recruitMajorIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/schoolRecruitMajor/${recruitMajorIds.join(',')}`,
    method: 'delete'
  });
}
