import request from "../request";

/**
 * 查询模拟考成绩列表
 * @returns
 */
export const getTestScoresList = async () => {
  let res = await request({
    url: "/student/score/info/list",
  });

  return res.data;
};

/**
 * 获取最大成绩，平均成绩，预测成绩
 * @returns
 */
export const getTestScoresInfo = async () => {
  let res = await request({
    url: "/student/score/info/getScoreInfoAll",
  });

  return res.data;
};

interface TestScores {
  kskm: string;
  score: number;
  type: string;
}
/**
 * 新增考试成绩
 * @param data
 */
export const createTestScores = async (data: TestScores) => {
  const res = await request({
    url: "/student/score/info",
    method: "POST",
    data,
  });
  return res.data;
};
