import axiosInstance from "@/api/axios.ts";
import type {IConveyLocationSearch} from "@/interface/page/convey/IConveyLocationSearch.ts";
import type {IAppConveyLocation} from "@/model/table/IAppConveyLocation.ts";

export default class ConveyApi {

    // 分页查询
    static query(queryData: IConveyLocationSearch, pageSize: number, pageIndex: number) {
        return axiosInstance.post("/app/conveyLocation/queryConveyLocation", queryData, {
            params: {
                pageSize,
                pageIndex
            }
        });
    };
    // 插入一条数据
    static addConveyLocation(data: IAppConveyLocation) {
        return axiosInstance.post("/app/conveyLocation/addConveyLocation", data);
    };
    // 修改一条数据
    static updateConveyLocation(data: IAppConveyLocation) {
        return axiosInstance.post("/app/conveyLocation/updateConveyLocation", data);
    };
    // 查询输送机状态
    static queryConveyStatus(locationId: string | undefined) {
        return axiosInstance.get("/app/conveyLocation/queryConveyLocationStatus", {
            params: {
                conveyId: locationId
            }
        });
    };

}