mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: support changing quest language
This commit is contained in:
1 parent
9b8d7109cf
commit
66b0b7ba68
18 files changed
+313
-109
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import { model, Schema, Types } from 'mongoose'
|
||||
import type { QuestLocale } from '../constants'
|
||||
import { SUPPORTED_LOCALES } from '../constants'
|
||||
|
||||
export interface INode {
|
||||
path: string
|
||||
@@ -27,6 +29,7 @@ export interface ISession {
|
||||
_id: Types.ObjectId
|
||||
user: Types.ObjectId
|
||||
quest: string
|
||||
locale: QuestLocale
|
||||
containerId: string | null
|
||||
containerName: string | null
|
||||
status: 'active' | 'finished' | 'inactive'
|
||||
@@ -52,6 +55,11 @@ export const Session = model<ISession>(
|
||||
ref: 'Quest',
|
||||
required: true,
|
||||
},
|
||||
locale: {
|
||||
type: String,
|
||||
enum: SUPPORTED_LOCALES,
|
||||
required: true,
|
||||
},
|
||||
containerId: String,
|
||||
containerName: String,
|
||||
status: {
|
||||
|
||||
Reference in new issue
Block a user