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

/** 获取学校招生计划列表 */
export function fetchGetSchoolEnrollPlanList(params?: Api.Art.SchoolEnrollPlanSearchParams) {
  return request<Api.Art.SchoolEnrollPlanList>({
    url: '/art/schoolEnrollPlan/list',
    method: 'get',
    params
  });
}
/** 新增学校招生计划 */
export function fetchCreateSchoolEnrollPlan(data: Api.Art.SchoolEnrollPlanOperateParams) {
  return request<boolean>({
    url: '/art/schoolEnrollPlan',
    method: 'post',
    data
  });
}

/** 修改学校招生计划 */
export function fetchUpdateSchoolEnrollPlan(data: Api.Art.SchoolEnrollPlanOperateParams) {
  return request<boolean>({
    url: '/art/schoolEnrollPlan',
    method: 'put',
    data
  });
}

/** 批量删除学校招生计划 */
export function fetchBatchDeleteSchoolEnrollPlan(planIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/schoolEnrollPlan/${planIds.join(',')}`,
    method: 'delete'
  });
}
