import {http} from '@/api/service/request';
import type {BaseResult, ResultTable} from '@/api/service/types';

/** ${comment}---获取${comment}列表 */
export const fetchGet${classUppercaseName}List = (data: any) => {
    return http.request<BaseResult<ResultTable>>('get', `${classLowercaseName}/get${classUppercaseName}List/${data.currentPage}/${data.pageSize}`, {params: data});
};

/** ${comment}---添加${comment} */
export const fetchAdd${classUppercaseName} = (data: any) => {
    return http.request<BaseResult<any>>('post', '${classLowercaseName}/add${classUppercaseName}', {data});
};

/** ${comment}---更新${comment} */
export const fetchUpdate${classUppercaseName} = (data: any) => {
    return http.request<BaseResult<any>>('put', '${classLowercaseName}/update${classUppercaseName}', {data});
};

/** ${comment}---删除${comment} */
export const fetchDelete${classUppercaseName} = (data: any) => {
    return http.request<BaseResult<any>>('delete', '${classLowercaseName}/delete${classUppercaseName}', {data});
};