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

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

// --------------------------------------------------------------------------
// 监测科目管理服务
// --------------------------------------------------------------------------

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

/** 添加监测科目 POST /api/exam-course/add */
export async function add(data: API.AddExamCourseInput, options?: { [key: string]: any }) {
    const url = '/api/exam-course/add';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 更新监测科目 POST /api/exam-course/update */
export async function update(data: API.UpdateExamCourseInput, options?: { [key: string]: any }) {
    const url = '/api/exam-course/update';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 删除监测科目 POST /api/exam-course/del */
export async function del(data: API.BaseId, options?: { [key: string]: any }) {
    const url = '/api/exam-course/del';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 根据ID获取监测科目信息 GET /api/exam-course/get-by-id */
export async function getById(
    params: {
        /**  */
        id?: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam-course/get-by-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamCourseOutput>>(url, config);
    return res?.data;
}

/** 查询监测年级列表 POST /api/exam-course/query-list */
export async function queryList(data: API.QueryExamCourseInput, options?: { [key: string]: any }) {
    const url = '/api/exam-course/query-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamCourseOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 添加监测科目 POST /api/exam-course/add */
    add,
    /** 更新监测科目 POST /api/exam-course/update */
    update,
    /** 删除监测科目 POST /api/exam-course/del */
    del,
    /** 根据ID获取监测科目信息 GET /api/exam-course/get-by-id */
    getById,
    /** 查询监测年级列表 POST /api/exam-course/query-list */
    queryList,
};
