/*
 * @Author: zc
 * @description 知识库 - 知识提问
 */
import request from '@/utils/request';
/**
 * @description 提问列表
 * @param {object} params
 * @return {*}
 */
export const questionList = (params: object) => {
	return request({
		url: '/api/v1/Knowledge/knowledge_questions/list',
		method: 'get',
		params,
	});
};
/**
 * @description 提问新增
 * @param {object} data
 * @return {*}
 */
export const questionAdd = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/knowledge_questions',
		method: 'post',
		data,
	});
};
/**
 * @description 提问修改
 * @param {object} data
 * @return {*}
 */
export const questionUpdate = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/knowledge_questions',
		method: 'put',
		data,
	});
};
/**
 * @description 提问删除
 * @param {object} data
 * @return {*}
 */
export const questionDelete = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/knowledge_questions',
		method: 'delete',
		data,
	});
};
/**
 * @description 提问回复
 * @param {object} data
 * @return {*}
 */
export const questionReply = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/knowledge_questions/Reply',
		method: 'put',
		data,
	});
};
/**
 * @description 提问详情
 * @param {object} id
 * @return {*}
 */
export const questionDetail = (id: string | string[]) => {
	return request({
		url: `/api/v1/Knowledge/knowledge_questions/${id}`,
		method: 'get',
	});
};
