import { request } from '/@/utils/service';
import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
import { Session } from '/@/utils/storage';
export const apiPrefix = '/api/system/job_applications/';
export function GetList(query: UserPageQuery) {
	return request({
		url: '/api/system/question_tag/list',
		method: 'get',
		params: {...query,tenant_id:Session.get('tenant_id')},
	});
}
export function GetObj(id: InfoReq) {
	return request({
		url: apiPrefix + id,
		method: 'get',
	});
}

export function AddObj(obj: AddReq) {
	return request({
		url: '/api/system/question_tag/create',
		method: 'post',
		data: {...obj,tenant_id:Session.get('tenant_id')},
	});
}

export function UpdateObj(obj: EditReq) {
	return request({
		url: '/api/system/question_tag/update',
		method: 'post',
		data: {...obj,tenant_id:Session.get('tenant_id')},
	});
}

export function DelObj(data:any) {
	return request({
		url:`/api/system/question_tag/delete`,
		method: 'post',
		data: {...data,tenant_id:Session.get('tenant_id')},
	});
}
export function GetPermission() {
    return request({
        url: apiPrefix,
        method: 'get',
    });
}

export function GetcategoryList(query: UserPageQuery) {
	return request({
		url: '/api/system/question_category/list',
		method: 'get',
		params: {...query,tenant_id:Session.get('tenant_id')},
	});
}
