import { Schema, Document } from "mongoose"; import MainModel from "../../connect/mongoose.ts"; export interface Widget3d extends Document { type: string; widgetID: string; widgetName: string; position: []; rotation: []; isArchive: boolean; zoneUuid:string Data: { measurements: {}; duration: string; }; } const Widget3dSchema: Schema = new Schema( { type: { type: String }, widgetID: { type: String }, widgetName: { type: String, default: "Widget3D" }, position: { type: Array }, rotation: { type: Array }, zoneUuid:{ type: String }, Data: { measurements: { type: Object, default: {} }, duration: { type: String, default: "1h" }, }, isArchive: { type: Boolean, default: false }, }, { timestamps: true } ); const widget3dModel = (db: any) => { return MainModel(db, "3dWidget", Widget3dSchema, "3dWidget"); }; export default widget3dModel;