mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add session to visits and events
This commit is contained in:
@@ -4,6 +4,7 @@ export type TEvent = {
|
||||
project_id: Schema.Types.ObjectId,
|
||||
name: string,
|
||||
metadata: Record<string, string>,
|
||||
session: string,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
@@ -11,6 +12,7 @@ const EventSchema = new Schema<TEvent>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
name: { type: String, required: true },
|
||||
metadata: Schema.Types.Mixed,
|
||||
session: { type: String },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
})
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ export type TVisit = {
|
||||
continent: string,
|
||||
country: string,
|
||||
|
||||
session: string,
|
||||
device: string,
|
||||
|
||||
website: string,
|
||||
@@ -26,6 +27,8 @@ const VisitSchema = new Schema<TVisit>({
|
||||
|
||||
continent: { type: String },
|
||||
country: { type: String },
|
||||
|
||||
session: { type: String },
|
||||
|
||||
device: { type: String },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user