import { httpApp } from "@/plugins/axiosApp";
import { Paper, ServerPageResponse } from "@/types";

/** 试卷分页查询 */
export function getPaperList(params: {
  courseId?: number;
  courseType?: string;
  projectId?: number;
  paperType?: string;
  pageNo?: number;
  pageSize?: number;
}) {
  return httpApp.post<any, ServerPageResponse<Paper>>(
    "/api/ess/paper/list",
    params
  );
}

/** 更新科目 */
export function updateCourse(params: {
  code?: string;
  name?: string;
  enable?: boolean;
  id?: number;
  type?: string;
  rootOrgId?: number;
}) {
  return httpApp.post("/api/ess/course/save", params);
}
