const mongoose = require('mongoose'); const hotspotSchema = new mongoose.Schema({ parent_scene_id: { type: mongoose.Schema.Types.ObjectId, ref: 'Scene', required: true }, target_scene_id: { type: mongoose.Schema.Types.ObjectId, ref: 'Scene' }, title: { type: String, trim: true }, description: { type: String, trim: true }, coordinates: { yaw: { type: Number, required: true }, pitch: { type: Number, required: true } }, is_auto_return: { type: Boolean, default: false } }, { timestamps: true }); module.exports = mongoose.model('Hotspot', hotspotSchema);