import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { SchoolList, GradeList } from "./types";

/**
 * 获取学校列表
 */
export function getSchoolList(): AxiosPromise<SchoolList[]> {
  return request({
    url: "/board/v1/schools",
    method: "get",
  });
}
/**
 * 获取班级列表
 */
export function getGradeList(id: number): AxiosPromise<GradeList[]> {
  return request({
    url: "/board/v1/grade",
    method: "get",
    params: { school_id: id },
  });
}
