feat: 支持配置微信用户已通关关卡

This commit is contained in:
richarjiang
2026-04-19 14:28:36 +08:00
parent 6e19bfa661
commit f3f27def2b
19 changed files with 7095 additions and 545 deletions

View File

@@ -1,7 +1,11 @@
export interface Level {
id: string
imageUrl: string
image1Url: string
image1Description: string | null
image2Url: string
image2Description: string | null
answer: string
punchline: string | null
hint1: string | null
hint2: string | null
hint3: string | null
@@ -11,8 +15,12 @@ export interface Level {
}
export interface LevelFormData {
imageUrl: string
image1Url: string
image1Description?: string
image2Url: string
image2Description?: string
answer: string
punchline?: string
hint1?: string
hint2?: string
hint3?: string
@@ -44,9 +52,11 @@ export interface WxUser {
sessionKey: string | null
nickname: string | null
avatarUrl: string | null
points: number
stamina: number
staminaUpdatedAt: Date | null
createdAt: Date
updatedAt: Date
completedLevelCount: number
}
export interface WxUserLevelProgress {
@@ -54,12 +64,27 @@ export interface WxUserLevelProgress {
userId: string
levelId: string
completedAt: Date
timeSpent: number
level?: {
id: string
answer: string
sortOrder: number
}
}
export interface WxUserWithProgress extends WxUser {
levelProgress: WxUserLevelProgress[]
}
export interface WxUserAssignableLevel {
id: string
answer: string
sortOrder: number
completed: boolean
progressId: string | null
completedAt: Date | null
}
export interface WxUserDetailResponse extends WxUser {
assignedLevels: WxUserAssignableLevel[]
}