Abdul Rehman commited on
Commit
a569cab
·
1 Parent(s): ca4fcfa

activity schema added

Browse files
src/modules/activity/activity.schema.ts CHANGED
@@ -8,6 +8,7 @@ export interface IUserActivityDocument extends Document {
8
  propertyId: IPropertyDocument;
9
  action: string; // E.g., 'click', 'view', 'time_spent'
10
  sessionId: string;
 
11
  timestamp: Date;
12
  duration?: number; // Store time spent in seconds for 'time_spent' action
13
  searchQuery?: string;
@@ -27,6 +28,7 @@ const UserActivitySchema = new mongoose.Schema<IUserActivityDocument>(
27
  },
28
  action: { type: String, required: true }, // 'click', 'view', 'time_spent'
29
  sessionId: { type: String, required: true },
 
30
  searchQuery: { type: String },
31
  timestamp: { type: Date, default: Date.now },
32
  duration: { type: Number }, // Only applicable for 'time_spent'
 
8
  propertyId: IPropertyDocument;
9
  action: string; // E.g., 'click', 'view', 'time_spent'
10
  sessionId: string;
11
+ id: string;
12
  timestamp: Date;
13
  duration?: number; // Store time spent in seconds for 'time_spent' action
14
  searchQuery?: string;
 
28
  },
29
  action: { type: String, required: true }, // 'click', 'view', 'time_spent'
30
  sessionId: { type: String, required: true },
31
+ id: { type: String },
32
  searchQuery: { type: String },
33
  timestamp: { type: Date, default: Date.now },
34
  duration: { type: Number }, // Only applicable for 'time_spent'