location controller updated with heading and created new models and controllers for remaining modules
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
import { model, Schema, Types } from "mongoose";
|
||||
import { locationSchema } from "../../helpers";
|
||||
|
||||
const geofenceSchema = new Schema({
|
||||
venue: {
|
||||
type: Types.ObjectId,
|
||||
required: false,
|
||||
ref: "venue",
|
||||
},
|
||||
action: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
const schema = new Schema({
|
||||
user: {
|
||||
type: Types.ObjectId,
|
||||
@@ -16,10 +28,21 @@ const schema = new Schema({
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
venue: {
|
||||
type: Types.ObjectId,
|
||||
event: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
activity: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
heading: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
geofence: {
|
||||
type: geofenceSchema,
|
||||
required: false,
|
||||
ref: "venue",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user