mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add flow-hash
This commit is contained in:
@@ -5,6 +5,7 @@ export type TEvent = {
|
||||
name: string,
|
||||
metadata: Record<string, string>,
|
||||
session: string,
|
||||
flowHash: string,
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
@@ -13,6 +14,7 @@ const EventSchema = new Schema<TEvent>({
|
||||
name: { type: String, required: true },
|
||||
metadata: Schema.Types.Mixed,
|
||||
session: { type: String },
|
||||
flowHash: { type: String },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
})
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { model, Schema, Types } from 'mongoose';
|
||||
export type TSession = {
|
||||
project_id: Schema.Types.ObjectId,
|
||||
session: string,
|
||||
flowHash: string,
|
||||
duration: number,
|
||||
updated_at: Date,
|
||||
created_at: Date,
|
||||
@@ -12,6 +13,7 @@ export type TSession = {
|
||||
const SessionSchema = new Schema<TSession>({
|
||||
project_id: { type: Types.ObjectId, index: 1 },
|
||||
session: { type: String, required: true },
|
||||
flowHash: { type: String },
|
||||
duration: { type: Number, required: true, default: 0 },
|
||||
updated_at: { type: Date, default: () => Date.now() },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
|
||||
@@ -10,6 +10,7 @@ export type TVisit = {
|
||||
country: string,
|
||||
|
||||
session: string,
|
||||
flowHash: string,
|
||||
device: string,
|
||||
|
||||
website: string,
|
||||
@@ -27,9 +28,9 @@ const VisitSchema = new Schema<TVisit>({
|
||||
|
||||
continent: { type: String },
|
||||
country: { type: String },
|
||||
|
||||
session: { type: String },
|
||||
|
||||
session: { type: String },
|
||||
flowHash: { type: String },
|
||||
device: { type: String },
|
||||
|
||||
website: { type: String, required: true },
|
||||
|
||||
Reference in New Issue
Block a user