// @ts-ignore
/* eslint-disable */

// 该文件自动生成，请勿手动修改！

// --------------------------------------------------------------------------
// 学制管理服务
// --------------------------------------------------------------------------

import { request } from '@umijs/max';
import { EducationStage } from '../enums';

/** 根据学段获取学制 GET /api/base/education-stage/years/get-by-education-stage */
export async function getByEducationStage(
    params: {
        /**  */
        educationstage: EducationStage;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/base/education-stage/years/get-by-education-stage';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.EducationStageYearsOutput>>(url, config);
    return res?.data;
}

/** 获取学制列表 GET /api/base/education-stage/years/get-all-list */
export async function getAllList(options?: { [key: string]: any }) {
    const url = '/api/base/education-stage/years/get-all-list';
    const config = { method: 'GET', ...(options || {}) };
    const res = await request<API.ResponseType<API.EducationStageYearsOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 根据学段获取学制 GET /api/base/education-stage/years/get-by-education-stage */
    getByEducationStage,
    /** 获取学制列表 GET /api/base/education-stage/years/get-all-list */
    getAllList,
};
