Reset data bị lỗi, thêm hotspot
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user