feat: support changing quest language

This commit is contained in:
neilchen0812 committed 2026-10-08 02:46:44 +10:30
1 parent 9b8d7109cf
commit 66b0b7ba68
18 files changed
+313 -109

No files matched your search

+8
View File
@@ -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: {