location controller updated with heading and created new models and controllers for remaining modules

This commit is contained in:
Shibi Chakkaravarthy
2026-05-04 20:57:03 +05:30
parent 1245e09111
commit 54d9508dc8
31 changed files with 2140 additions and 96 deletions
+26 -3
View File
@@ -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",
},
});