zoneId modified to string in schema model bcz of zoneUUId
This commit is contained in:
@@ -8,7 +8,7 @@ export interface Widget3d extends Document {
|
|||||||
position: [];
|
position: [];
|
||||||
rotation: [];
|
rotation: [];
|
||||||
isArchive: boolean;
|
isArchive: boolean;
|
||||||
zoneId: Zone["_id"];
|
zoneId: string;
|
||||||
Data: {
|
Data: {
|
||||||
measurements: {};
|
measurements: {};
|
||||||
duration: string;
|
duration: string;
|
||||||
@@ -21,7 +21,7 @@ const Widget3dSchema: Schema = new Schema(
|
|||||||
widgetName: { type: String, default: "Widget3D" },
|
widgetName: { type: String, default: "Widget3D" },
|
||||||
position: { type: Array },
|
position: { type: Array },
|
||||||
rotation: { type: Array },
|
rotation: { type: Array },
|
||||||
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
|
zoneId: { type: String },
|
||||||
Data: {
|
Data: {
|
||||||
measurements: { type: Object, default: {} },
|
measurements: { type: Object, default: {} },
|
||||||
duration: { type: String, default: "1h" },
|
duration: { type: String, default: "1h" },
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export interface FloatingWidget extends Document {
|
|||||||
per: string;
|
per: string;
|
||||||
value: string;
|
value: string;
|
||||||
isArchive: boolean;
|
isArchive: boolean;
|
||||||
zoneId: Zone["_id"];
|
zoneId: string;
|
||||||
Data: {
|
Data: {
|
||||||
measurements: {};
|
measurements: {};
|
||||||
duration: string;
|
duration: string;
|
||||||
@@ -25,7 +25,7 @@ const floatingWidgetSchema: Schema = new Schema(
|
|||||||
position: { type: Object },
|
position: { type: Object },
|
||||||
per: { type: String },
|
per: { type: String },
|
||||||
value: { type: String },
|
value: { type: String },
|
||||||
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
|
zoneId: { type: String },
|
||||||
Data: {
|
Data: {
|
||||||
measurements: { type: Object, default: {} },
|
measurements: { type: Object, default: {} },
|
||||||
duration: { type: String, default: "1h" },
|
duration: { type: String, default: "1h" },
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import mongoose, { Schema, Document } from "mongoose";
|
|||||||
import MainModel from "../../connect/mongoose.ts";
|
import MainModel from "../../connect/mongoose.ts";
|
||||||
import { Zone } from "../Builder/zoneModel.ts";
|
import { Zone } from "../Builder/zoneModel.ts";
|
||||||
export interface Panel extends Document {
|
export interface Panel extends Document {
|
||||||
zoneId: Zone["_id"];
|
zoneId: string;
|
||||||
panelName: string;
|
panelName: string;
|
||||||
widgets: [mongoose.Types.ObjectId];
|
widgets: [mongoose.Types.ObjectId];
|
||||||
isArchive: boolean;
|
isArchive: boolean;
|
||||||
}
|
}
|
||||||
const panelSchema: Schema = new Schema(
|
const panelSchema: Schema = new Schema(
|
||||||
{
|
{
|
||||||
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
|
zoneId: { type: String },
|
||||||
panelName: { type: String },
|
panelName: { type: String },
|
||||||
widgets: [{ type: mongoose.Schema.Types.ObjectId, ref: "Widget" }],
|
widgets: [{ type: mongoose.Schema.Types.ObjectId, ref: "Widget" }],
|
||||||
isArchive: { type: Boolean, default: false },
|
isArchive: { type: Boolean, default: false },
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export interface widget extends Document {
|
|||||||
measurements: {};
|
measurements: {};
|
||||||
duration: string;
|
duration: string;
|
||||||
};
|
};
|
||||||
zoneId: Zone["_id"];
|
zoneId: string;
|
||||||
}
|
}
|
||||||
const widgetSchema: Schema = new Schema(
|
const widgetSchema: Schema = new Schema(
|
||||||
{
|
{
|
||||||
@@ -36,7 +36,7 @@ const widgetSchema: Schema = new Schema(
|
|||||||
fontWeight: { type: String },
|
fontWeight: { type: String },
|
||||||
isArchive: { type: Boolean, default: false },
|
isArchive: { type: Boolean, default: false },
|
||||||
panelID: { type: mongoose.Schema.Types.ObjectId, ref: "Panel" },
|
panelID: { type: mongoose.Schema.Types.ObjectId, ref: "Panel" },
|
||||||
zoneId: { type: Schema.Types.ObjectId, ref: "Zone" },
|
zoneId: { type: String },
|
||||||
},
|
},
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user