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

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

// --------------------------------------------------------------------------
// 学校班级信息管理服务
// --------------------------------------------------------------------------

import { request } from '@umijs/max';

/** 添加学校班级 POST /api/base/school/class/add */
export async function add(data: API.AddSchoolClassInput, options?: { [key: string]: any }) {
    const url = '/api/base/school/class/add';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 批量添加学校班级 POST /api/base/school/class/batch-add */
export async function batchAdd(
    data: API.BatchAddSchoolClassInput,
    options?: { [key: string]: any },
) {
    const url = '/api/base/school/class/batch-add';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 根据ID获取学校班级信息 GET /api/base/school/class/get-by-id */
export async function getById(
    params: {
        /**  */
        id: string;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/base/school/class/get-by-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.SchoolClassOutput>>(url, config);
    return res?.data;
}

/** 根据级获取学校班级列表 GET /api/base/school/class/get-list-by-grade-begin-year */
export async function getListByGradeBeginYear(
    params: {
        /**  */
        gradebeginyear: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/base/school/class/get-list-by-grade-begin-year';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.SchoolClassOutput[]>>(url, config);
    return res?.data;
}

/** 分页查询班级列表 POST /api/base/school/class/query-page-list */
export async function queryPageList(
    data: API.SchoolClassPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/base/school/class/query-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.SchoolClassOutput>>>(
        url,
        config,
    );
    return res?.data;
}

export default {
    /** 添加学校班级 POST /api/base/school/class/add */
    add,
    /** 批量添加学校班级 POST /api/base/school/class/batch-add */
    batchAdd,
    /** 根据ID获取学校班级信息 GET /api/base/school/class/get-by-id */
    getById,
    /** 根据级获取学校班级列表 GET /api/base/school/class/get-list-by-grade-begin-year */
    getListByGradeBeginYear,
    /** 分页查询班级列表 POST /api/base/school/class/query-page-list */
    queryPageList,
};
