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

const request = (url, ...arg) => baseRequest(`/sys/tenant/` + url, ...arg)

/**
 * sys_tenant
 **/
export default {
	// 获取sys_tenant分页
	sysTenantPage(data) {
		return request('page', data, 'get')
	},
	// 获取sys_tenant列表
	sysTenantList(data) {
		return request('list', data, 'get')
	},
	// 提交sys_tenant表单 edit为true时为编辑，默认为新增
	sysTenantSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除sys_tenant
	sysTenantDelete(data) {
		return request('delete', data)
	},
	// 获取sys_tenant详情
	sysTenantDetail(data) {
		return request('detail', data, 'get')
	}
}
