Asset point updated for the vehicle and conveyor widget 3D update delete routing completed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: {} },
|
||||
|
||||
@@ -1,45 +1,44 @@
|
||||
const swaggerAutogen = require('swagger-autogen')
|
||||
const swaggerAutogen = require("swagger-autogen");
|
||||
|
||||
const dotenv = require('dotenv')
|
||||
const dotenv = require("dotenv");
|
||||
const path = require("path");
|
||||
|
||||
const envPath = path.resolve(__dirname, "../../../.env");
|
||||
|
||||
|
||||
dotenv.config({ path: envPath });
|
||||
const ip = require('ip')
|
||||
const ip = require("ip");
|
||||
const PORT = process.env.API_PORT;
|
||||
|
||||
const doc = {
|
||||
info: {
|
||||
title: 'dwinzo documentation',
|
||||
description: 'Description'
|
||||
title: "dwinzo documentation",
|
||||
description: "Description",
|
||||
},
|
||||
host: '185.100.212.76:5000',
|
||||
basePath: '/api/v1',
|
||||
schemes: ['http'],
|
||||
|
||||
// host: "185.100.212.76:5000",
|
||||
host: "192.168.0.102:5000",
|
||||
// basePath: "/api/v1",
|
||||
schemes: ["http"],
|
||||
};
|
||||
|
||||
const outputFile = './../../../swagger-output.json';
|
||||
const outputFile = "./../../../swagger-output.json";
|
||||
const routes = [
|
||||
'./../../api-server/Routes/user-Routes.ts',
|
||||
'./../../api-server/Routes/camera-Routes.ts',
|
||||
'./../../api-server/Routes/environments-Routes.ts',
|
||||
'./../../api-server/Routes/flooritem-Routes.ts',
|
||||
'./../../api-server/Routes/lines-Routes.ts',
|
||||
'./../../api-server/Routes/share-Routes.ts',
|
||||
'./../../api-server/Routes/wallItems-Routes.ts',
|
||||
"./../../api-server/Routes/user-Routes.ts",
|
||||
"./../../api-server/Routes/camera-Routes.ts",
|
||||
"./../../api-server/Routes/environments-Routes.ts",
|
||||
"./../../api-server/Routes/flooritem-Routes.ts",
|
||||
"./../../api-server/Routes/lines-Routes.ts",
|
||||
"./../../api-server/Routes/share-Routes.ts",
|
||||
"./../../api-server/Routes/wallItems-Routes.ts",
|
||||
"./../../api-server/Routes/floadWidgetRoute.ts",
|
||||
"./../../api-server/Routes/panelRoutes.ts",
|
||||
"./../../api-server/Routes/templateRoutes.ts",
|
||||
"./../../api-server/Routes/widget3dRoutes.ts",
|
||||
"./../../api-server/Routes/widgetRoute.ts",
|
||||
"./../../api-server/Routes/assetfloorRoutes.ts",
|
||||
"./../../api-server/Routes/assetpointRoutes.ts",
|
||||
"./../../api-server/Routes/zoneRoutes.ts",
|
||||
];
|
||||
|
||||
|
||||
|
||||
swaggerAutogen()(outputFile, routes, doc).then(() => {
|
||||
console.log('Swagger documentation generated!');
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("Swagger documentation generated!");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user