import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/pigpen/` + url, ...arg)

/**
 * base_pigpenApi接口管理器
 *
 * @author newspaper
 * @date  2023/12/05 08:55
 **/
export default {
	basePigpenTree(data) {
		return request('tree', data, 'get')
	},
	// 获取base_pigpen分页
	basePigpenPage(data) {
		return request('page', data, 'get')
	},
	// 提交base_pigpen表单 edit为true时为编辑，默认为新增
	basePigpenSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除base_pigpen
	basePigpenDelete(data) {
		return request('delete', data)
	},
	// 获取base_pigpen详情
	basePigpenDetail(data) {
		return request('detail', data, 'get')
	},
	basePigpenType(data) {
		return request('stageSelector', data, 'get')
	},
	baseParentTree(data) {
		return request('getTree', data, 'get')
	}
}
