mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor: move analytics into services directory
This commit is contained in:
1 parent
e43cbe26ce
commit
740cbcecb4
31 files changed
+6
-5
No files matched your search
@@ -0,0 +1,61 @@
|
||||
import { Types } from 'mongoose'
|
||||
|
||||
export interface User {
|
||||
username: string
|
||||
}
|
||||
export interface SessionDocument {
|
||||
_id: Types.ObjectId
|
||||
user: User
|
||||
quest: string
|
||||
status: string
|
||||
createdAt: Date
|
||||
finishedAt: Date
|
||||
}
|
||||
export interface CommandObject {
|
||||
command: string
|
||||
pwd: string
|
||||
stage?: string | null
|
||||
output: string | undefined
|
||||
error: string | undefined
|
||||
createdAt: string
|
||||
}
|
||||
export interface SessionObject {
|
||||
_id: Types.ObjectId
|
||||
user: string
|
||||
quest: string
|
||||
status: string
|
||||
createdAt: string
|
||||
finishedAt: string
|
||||
lastActivityAt: string
|
||||
usedTime: string
|
||||
commandCount: number
|
||||
commands: CommandObject[]
|
||||
}
|
||||
export interface SessionDetail {
|
||||
_id: Types.ObjectId
|
||||
user: string
|
||||
quest: string
|
||||
status: string
|
||||
createdAt: string
|
||||
finishedAt: string
|
||||
usedTime: string
|
||||
commands: CommandObject[]
|
||||
}
|
||||
export interface IUser extends Document {
|
||||
hashedPassword?: string
|
||||
socialLogins?: Record<
|
||||
string,
|
||||
{
|
||||
id: string
|
||||
provider: string
|
||||
displayName?: string | null | undefined
|
||||
}
|
||||
>
|
||||
}
|
||||
export interface UserSessionDetail {
|
||||
_id: Types.ObjectId
|
||||
quest: string
|
||||
status: string
|
||||
createdAt: string
|
||||
usedTime: string
|
||||
}
|
||||
Reference in new issue
Block a user