import request from '/@/utils/request';

/**
 * 获取列表
 * @param query
 */
export const fetchList = (query?: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch/page',
		method: 'get',
		params: query,
	});
};

/**
 * 获取模拟学生列表
 * @param query
 */
export const getMNStuList = (query?: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch/getMNStuList',
		method: 'get',
		params: query,
	});
};

/**
 * 新增
 * @param obj
 */
export const addObj = (obj: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch',
		method: 'post',
		data: obj,
	});
};

/**
 * 新增模拟对象
 * @param obj
 */
export const addMNObj = (obj: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch/addMNObj',
		method: 'post',
		data: obj,
	});
};

/**
 * 获取详情
 * @param id
 */
export const getObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitImitateAdjustBatch/${id}`,
		method: 'get',
	});
};

/**
 * 获取模拟对象
 * @param id
 */
export const getMNObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitImitateAdjustBatch/getMNObj/${id}`,
		method: 'get',
	});
};

/**
 * 删除
 * @param id
 */
export const delObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitImitateAdjustBatch/delete`,
		method: 'post',
		data: { id:id }
	});
};

/**
 * 删除模拟对象
 * @param id
 */
export const delMNObj = (id: string | number) => {
	return request({
		url: `/recruit/recruitImitateAdjustBatch/delMNObj`,
		method: 'post',
		data: { id:id }
	});
};

/**
 * 更新
 * @param obj
 */
export const putObj = (obj: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch',
		method: 'put',
		data: obj,
	});
};

/**
 * 更新模拟对象
 * @param obj
 */
export const putMNObj = (obj: any) => {
	return request({
		url: '/recruit/recruitImitateAdjustBatch/putMNObj',
		method: 'put',
		data: obj,
	});
};
