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

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

// --------------------------------------------------------------------------
// 试卷小题管理服务
// --------------------------------------------------------------------------

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

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

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

/** 批量更新 POST /api/exam-paper-question-minor/batch-update */
export async function batchUpdate(
    data: API.BatchUpdateExamPaperQuestionMinorInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam-paper-question-minor/batch-update';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

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

/** 根据试卷ID获取小题列表 GET /api/exam-paper-question-minor/get-list-by-exam-paper-id */
export async function getListByExamPaperId(
    params: {
        /**  */
        exampaperid: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam-paper-question-minor/get-list-by-exam-paper-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamPaperQuestionMinorOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 添加 POST /api/exam-paper-question-minor/add */
    add,
    /** 更新 POST /api/exam-paper-question-minor/update */
    update,
    /** 批量更新 POST /api/exam-paper-question-minor/batch-update */
    batchUpdate,
    /** 删除 POST /api/exam-paper-question-minor/del */
    del,
    /** 根据试卷ID获取小题列表 GET /api/exam-paper-question-minor/get-list-by-exam-paper-id */
    getListByExamPaperId,
};
