Asset point updated for the vehicle and conveyor widget 3D update delete routing completed

This commit is contained in:
2025-04-04 16:50:39 +05:30
parent 7b8636c43b
commit 33d6519ece
10 changed files with 484 additions and 298 deletions

View File

@@ -2,30 +2,33 @@ import mongoose, { Schema, Document } from "mongoose";
import MainModel from "../../../connect/mongoose.ts";
// Common Interfaces
interface ITriggerConveyor {
uuid: string;
name: string;
type: string;
isUsed: boolean;
bufferTime: number;
}
interface ITriggerVehicle {
uuid: string;
name: string;
type: string;
isUsed: boolean;
}
// interface ITriggerConveyor {
// uuid: string;
// name: string;
// type: string;
// isUsed: boolean;
// bufferTime: number;
// }
// interface ITriggerVehicle {
// uuid: string;
// name: string;
// type: string;
// isUsed: boolean;
// }
interface IConnection {
source: { pathUUID: string; pointUUID: string };
targets: { pathUUID: string; pointUUID: string }[];
}
// interface IConnectionConveyor {
// source: { pathUUID: string; pointUUID: string };
// targets: { pathUUID: string; pointUUID: string }[];
// }
// interface IConnectionVehicle {
// source: { modelUUID: string; pointUUID: string };
// targets: { pathUUID: string; pointUUID: string }[];
// }
// Point Types
interface IPointBase {
uuid: string;
position: number[];
connections: IConnection;
}
interface IPointConveyor extends IPointBase {
@@ -46,25 +49,27 @@ interface IPointConveyor extends IPointBase {
isUsed: boolean;
bufferTime: number;
}>;
connections: {
source: { pathUUID: string; pointUUID: string };
targets: Array<{ pathUUID: string; pointUUID: string }>;
};
}
interface IPointVehicle extends IPointBase {
actions: Array<{
actions: {
uuid: string;
name: string;
type: string;
isUsed: boolean;
hitCount: number;
start: string;
end: string;
start: { x: number; y: number } | {};
end: { x: number; y: number } | {};
buffer: number;
}>;
triggers: Array<{
uuid: string;
name: string;
type: string;
isUsed: boolean;
}>;
};
speed: number;
connections: {
source: { modelUUID: string; pointUUID: string };
targets: Array<{ pathUUID: string; pointUUID: string }>;
};
}
// Main Document Interface

View File

@@ -6,6 +6,7 @@ export interface Widget3d extends Document {
widgetID: string;
widgetName: string;
position: [];
rotation: [];
isArchive: boolean;
zoneId: string;
Data: {
@@ -19,6 +20,7 @@ const Widget3dSchema: Schema = new Schema(
widgetID: { type: String },
widgetName: { type: String, default: "Widget3D" },
position: { type: Array },
rotation: { type: Array },
zoneId: { type: String },
Data: {
measurements: { type: Object, default: {} },