import http from "@/utils/request"

export default {
	gen_table: {
		list: async function (data = {}) {
			return await http.get("gen_table/list", data);
		},
		add: async function (data = {}) {
			return await http.post("gen_table/add", data);
		},
		edit: async function (data = {}) {
			return await http.post("gen_table/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("gen_table/del", data);
		},
		select: async function (data = {}) {
			return await http.get("gen_table/select", data);
		},
		build: async function (data = {}) {
			return await http.post("gen_table/build", data);
		},
		info: async function (data = {}) {
			return await http.get("gen_table/info", data);
		},
		sync: async function (data = {}) {
			return await http.post("gen_table/sync", data);
		},
		show: async function (data = {}) {
			return await http.get("gen_table/show", data);
		},
	},
	form: {
		build: async function (data = {}) {
			return await http.post("form/build", data);
		},
	},
	file: {
		export: async function (data = {}) {
			return await http.get("file/export", data);
		},
	},
	attachment: {
		list: async function (data = {}) {
			return await http.get("attachment/list", data);
		},
		del: async function (data = {}) {
			return await http.delete("attachment/del", data);
		},
		clear: async function (data = {}) {
			return await http.delete("attachment/clear", data);
		},
	},
}
