mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
Merge branch 'main' into ts-analytics
This commit is contained in:
23 files changed
+504
-180
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import { model, Schema, Types } from 'mongoose'
|
||||
|
||||
import { IResponse, responseSchema } from './response.js'
|
||||
|
||||
export interface INode {
|
||||
path: string
|
||||
type: string
|
||||
@@ -46,13 +48,14 @@ export interface ISession {
|
||||
user: Types.ObjectId
|
||||
quest: string
|
||||
containerId: string | null
|
||||
status: string
|
||||
status: 'active' | 'finished' | 'inactive'
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
finishedAt?: Date
|
||||
lastActivityAt: Date
|
||||
tasks: ITask[]
|
||||
hints: string[][]
|
||||
responses: IResponse[][]
|
||||
graph: INode
|
||||
}
|
||||
|
||||
@@ -85,6 +88,11 @@ export const Session = model<ISession>(
|
||||
},
|
||||
tasks: [taskSchema],
|
||||
hints: [[String]],
|
||||
responses: {
|
||||
type: [[responseSchema]],
|
||||
required: true,
|
||||
default: [],
|
||||
},
|
||||
graph: {
|
||||
type: nodeSchema,
|
||||
default: {
|
||||
|
||||
Reference in new issue
Block a user