79 lines
2.0 KiB
JavaScript
79 lines
2.0 KiB
JavaScript
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
const TimeSlotsSchema = new Schema(
|
|
{
|
|
Date: String,
|
|
Time_Slots: [String],
|
|
},
|
|
{ _id: false }
|
|
);
|
|
|
|
const rpgwalklistSchema = new Schema({
|
|
Map_ID: String,
|
|
Map_Name: String,
|
|
Map_Description: String,
|
|
Trivia_List: [
|
|
{
|
|
Trivia_ID: String,
|
|
Trivia: String
|
|
}
|
|
],
|
|
Map_Thumbnail_URL: String,
|
|
Map_Status: String,
|
|
Map_Type: String,
|
|
Map_Category: [String],
|
|
Map_Rating: Number,
|
|
Map_Startlongitude: Number,
|
|
Map_Startlatitude: Number,
|
|
Map_Version: Number,
|
|
Sort_Number: Number,
|
|
Walk_Type: String,
|
|
Amount_Per_Person: Number,
|
|
Maximum_Persons_Allowed: Number,
|
|
Walk_Duration: Number,
|
|
Total_POI: Number,
|
|
TotalWalkDistance: String,
|
|
ArScene_AB_Url: String,
|
|
ArPoi: String,
|
|
AssetBundle_Name: String,
|
|
AssetBundle_IOS_Name: String,
|
|
PeriscopeARScene_Name: String,
|
|
PeriscopeARScene_URL: String,
|
|
PeriscopeARScene_IOS_URL: String,
|
|
ArScene_AB_IOS_Url: String,
|
|
Map_Ratting: String,
|
|
Map_Zip_Url: String,
|
|
Total_Trivia: String,
|
|
Dates: [TimeSlotsSchema],
|
|
Map_Polycoords: [
|
|
{
|
|
lng: Number,
|
|
lat: Number
|
|
}
|
|
],
|
|
POI_List: [
|
|
{
|
|
POI_ID: String,
|
|
POI_Number: Number,
|
|
POI_Name: String,
|
|
POI_Address: String,
|
|
POI_Description: String,
|
|
POI_Type: String,
|
|
POI_Thumbnail_URL: Array,
|
|
POI_Status: String,
|
|
POI_Content_Type: String,
|
|
POI_Content_URL: String,
|
|
POI_Trigger_Area: Number,
|
|
Latitude: Number,
|
|
Longitude: Number
|
|
}
|
|
],
|
|
DateofRegistration: Date,
|
|
});
|
|
|
|
// rpgwalklistSchema.index({ Map_Startlongitude: '2dsphere', Map_Startlatitude: '2dsphere' });
|
|
|
|
|
|
const newRpgwalklistEntry = mongoose.model('rpgwalklist', rpgwalklistSchema);
|
|
module.exports = newRpgwalklistEntry; |