bugs cleared for the testing purpose

This commit is contained in:
2025-06-02 16:48:44 +05:30
parent 17727c1281
commit 09ea99098f
41 changed files with 117 additions and 163 deletions

View File

@@ -3,7 +3,7 @@ import MainModel from "../../connect/mongoose.ts";
import { User } from "./userAuthModel.ts";
export interface Token extends Document {
userId: User["_id"];
isArchive: Boolean;
isArchive: boolean;
refreshToken: string;
resetTokenExpiry?: Date;
resetToken: string;

View File

@@ -13,14 +13,14 @@ export interface Camera extends Document {
z: number;
};
target: {
x: { type: Number; required: true };
y: { type: Number; required: true };
z: { type: Number; required: true };
x: { type: number; required: true };
y: { type: number; required: true };
z: { type: number; required: true };
};
rotation: {
x: { type: Number; required: true };
y: { type: Number; required: true };
z: { type: Number; required: true };
x: { type: number; required: true };
y: { type: number; required: true };
z: { type: number; required: true };
};
}

View File

@@ -125,12 +125,12 @@ interface StorageEventSchema extends AssetEventSchema {
point: StoragePointSchema;
}
interface IPointModel extends Document {
modelUuid: String;
modelName: String;
position: String;
rotation: String;
state: String;
productId: String;
modelUuid: string;
modelName: string;
position: [number];
rotation: [number];
state: string;
productId: string;
isArchive: boolean;
type: "transfer" | "vehicle" | "roboticArm" | "machine" | "storageUnit";
speed: number;

View File

@@ -6,7 +6,7 @@ import MainModel from "../../connect/mongoose.ts";
interface IComment {
userId: User["_id"];
comment: string;
timestamp:Number
timestamp:number
}
export interface IThread extends Document {
projectId: Project["_id"];

View File

@@ -1,4 +1,4 @@
import { Schema, Document, model } from "mongoose";
import { Schema, Document } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
import { Zone } from "../Builder/zoneModel.ts";
export interface Widget3d extends Document {
@@ -8,7 +8,7 @@ export interface Widget3d extends Document {
position: [];
rotation: [];
isArchive: boolean;
zoneId: string;
zoneId: Zone["_id"];
Data: {
measurements: {};
duration: string;
@@ -21,7 +21,7 @@ const Widget3dSchema: Schema = new Schema(
widgetName: { type: String, default: "Widget3D" },
position: { type: Array },
rotation: { type: Array },
zoneId: { type: String },
zoneId:{ type: Schema.Types.ObjectId, ref: "Zone" },
Data: {
measurements: { type: Object, default: {} },
duration: { type: String, default: "1h" },

View File

@@ -1,5 +1,5 @@
import { Schema, Document, model } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
import { Schema, Document } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
import { Zone } from "../Builder/zoneModel.ts";
export interface FloatingWidget extends Document {
className: string;
@@ -10,7 +10,7 @@ export interface FloatingWidget extends Document {
per: string;
value: string;
isArchive: boolean;
zoneId: string;
zoneId: Zone["_id"];
Data: {
measurements: {};
duration: string;
@@ -25,7 +25,7 @@ const floatingWidgetSchema: Schema = new Schema(
position: { type: Object },
per: { type: String },
value: { type: String },
zoneId: { type: String },
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
Data: {
measurements: { type: Object, default: {} },
duration: { type: String, default: "1h" },

View File

@@ -2,14 +2,14 @@ import mongoose, { Schema, Document } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
import { Zone } from "../Builder/zoneModel.ts";
export interface Panel extends Document {
zoneId: string;
zoneId: Zone["_id"];
panelName: string;
widgets: [mongoose.Types.ObjectId];
isArchive: boolean;
}
const panelSchema: Schema = new Schema(
{
zoneId: { type: String },
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
panelName: { type: String },
widgets: [{ type: mongoose.Schema.Types.ObjectId, ref: "Widget" }],
isArchive: { type: Boolean, default: false },

View File

@@ -1,7 +1,7 @@
import mongoose, { Schema, Document } from "mongoose";
import MainModel from "../../connect/mongoose.ts";
import { Zone } from "../Builder/zoneModel.ts";
export interface widget extends Document {
export interface Widget extends Document {
widgetName: string;
widgetside: string;
widgetID: string;
@@ -17,7 +17,7 @@ export interface widget extends Document {
measurements: {};
duration: string;
};
zoneId: string;
zoneId: Zone["_id"];
}
const widgetSchema: Schema = new Schema(
{
@@ -36,7 +36,7 @@ const widgetSchema: Schema = new Schema(
fontWeight: { type: String },
isArchive: { type: Boolean, default: false },
panelID: { type: mongoose.Schema.Types.ObjectId, ref: "Panel" },
zoneId: { type: String },
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
},
{ timestamps: true }
);