add flow-hash

This commit is contained in:
Emily
2024-06-10 15:05:05 +02:00
parent e0981cef4a
commit 0c3a25b7e0
6 changed files with 31 additions and 10 deletions

View File

@@ -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() },