ArmBot,staticmachine poits schema creation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user