import request from "@/utils/httpRequest";
import { PSI_MANAGEMANT as prefix } from "../AppPath";

export default class DishTypeService {
	list(param) {
		return request({
			url: prefix + "/psi/dishType/list",
			method: "get",
			params: param,
		});
	}
	treeData(param) {
		return request({
			url: prefix + "/psi/dishType/treeData",
			method: "get",
			params: param,
		});
	}
	save(param) {
		return request({
			url: prefix + "/psi/dishType/save",
			method: "post",
			data: param,
		});
	}
	findById(id) {
		return request({
			url: prefix + "/psi/dishType/findById",
			method: "get",
			params: { id: id },
		});
	}
	remove(id) {
		return request({
			url: prefix + "/psi/dishType/deleteById",
			method: "get",
			params: { id: id },
		});
	}
	changeStatus(id, status) {
		return request({
			url: prefix + "/psi/dishType/changeStatus",
			method: "get",
			params: { id: id, status: status },
		});
	}
}
