V2 API for visualization gomathi part completed
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
import mongoose, { Document, Schema } from "mongoose";
|
||||
import MainModel from "../../../connect/mongoose.ts";
|
||||
|
||||
interface IAction {
|
||||
uuid: string;
|
||||
name: string;
|
||||
type: string;
|
||||
material: string;
|
||||
delay: string;
|
||||
spawnInterval: string;
|
||||
isUsed: boolean;
|
||||
}
|
||||
|
||||
// Interface for TypeScript with PascalCase
|
||||
export interface assetData extends Document {
|
||||
modeluuid: string;
|
||||
@@ -42,16 +52,16 @@ const assetDataSchema: Schema = new Schema({
|
||||
uuid: { type: String },
|
||||
position: { type: Array },
|
||||
rotation: { type: Array },
|
||||
actions: [{ type: mongoose.Schema.Types.ObjectId, ref: "Widget" }],
|
||||
triggers: [{ type: mongoose.Schema.Types.ObjectId, ref: "Widget" }],
|
||||
actions: [{ type: mongoose.Schema.Types.ObjectId, ref: "Actions" }],
|
||||
triggers: [{ type: mongoose.Schema.Types.ObjectId, ref: "Triggers" }],
|
||||
},
|
||||
],
|
||||
isLocked: { type: Boolean },
|
||||
isVisible: { type: Boolean },
|
||||
rotation: {
|
||||
x: { type: Number, required: true },
|
||||
y: { type: Number, required: true },
|
||||
z: { type: Number, required: true },
|
||||
x: { type: Number },
|
||||
y: { type: Number },
|
||||
z: { type: Number },
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user