Files
Dwinzo-Backend-V0.0/src/shared/V1Models/Vizualization/3dwidget.ts

37 lines
922 B
TypeScript
Raw Normal View History

2025-06-02 16:48:44 +05:30
import { Schema, Document } from "mongoose";
2025-05-17 11:15:53 +05:30
import MainModel from "../../connect/mongoose.ts";
export interface Widget3d extends Document {
type: string;
widgetID: string;
widgetName: string;
position: [];
rotation: [];
isArchive: boolean;
2025-06-03 14:54:00 +05:30
zoneUuid:string
2025-05-17 11:15:53 +05:30
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 },
2025-06-03 14:54:00 +05:30
zoneUuid:{ type: String },
2025-05-17 11:15:53 +05:30
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;