ArmBot,staticmachine poits schema creation

This commit is contained in:
2025-04-08 17:17:36 +05:30
parent e7216d9116
commit c4d8fc14c8
3 changed files with 134 additions and 7 deletions

View File

@@ -72,11 +72,39 @@ interface IPointVehicle extends IPointBase {
};
}
interface IPointArmbot extends IPointBase {
rotation: number[];
actions: {
uuid: string;
name: string;
speed: number;
processes: { triggerId: string; startPoint: string; endPoint: string }[]
};
triggers: { uuid: string; name: string; type: string };
connections: {
source: { modelUUID: string; pointUUID: string };
targets: { modelUUID: string; pointUUID: string }[]
};
}
interface IPointStaticMachine extends IPointBase{
rotation: number[];
actions: {
uuid: string;
name: string;
buffer: number ;
material: string;
},
triggers: { uuid: string; name: string; type: string };
connections: {
source: { modelUUID: string; pointUUID: string };
targets: { modelUUID: string; pointUUID: string }[] };
}
// Main Document Interface
interface IPointModel extends Document {
modelfileID: string;
type: "Conveyor" | "Vehicle";
points: IPointConveyor[] | IPointVehicle;
type: "Conveyor" | "Vehicle" |"ArmBot" |"StaticMachine",
points: IPointConveyor[] | IPointVehicle |IPointArmbot |IPointStaticMachine;
isArchive: boolean;
}
@@ -84,7 +112,7 @@ interface IPointModel extends Document {
const PointSchema = new Schema<IPointModel>(
{
modelfileID: { type: String },
type: { type: String, enum: ["Conveyor", "Vehicle"], required: true },
type: { type: String, enum: ["Conveyor", "Vehicle","ArmBot","StaticMachine"], required: true },
isArchive: { type: Boolean, default: false },
points: {
type: Schema.Types.Mixed, // Flexible structure based on type