feat: 支持配置微信用户已通关关卡
This commit is contained in:
@@ -12,15 +12,19 @@ datasource db {
|
||||
}
|
||||
|
||||
model Level {
|
||||
id String @id @default(uuid())
|
||||
imageUrl String @map("image_url")
|
||||
answer String
|
||||
hint1 String?
|
||||
hint2 String?
|
||||
hint3 String?
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @default(uuid())
|
||||
image1Url String @map("image1_url") @db.VarChar(500)
|
||||
image1Description String? @map("image1_description") @db.VarChar(500)
|
||||
image2Url String @map("image2_url") @db.VarChar(500)
|
||||
image2Description String? @map("image2_description") @db.VarChar(500)
|
||||
answer String
|
||||
punchline String? @db.VarChar(500)
|
||||
hint1 String?
|
||||
hint2 String?
|
||||
hint3 String?
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
userProgress WxUserLevelProgress[]
|
||||
|
||||
@@ -89,14 +93,15 @@ model Verification {
|
||||
}
|
||||
|
||||
model WxUser {
|
||||
id String @id @default(uuid())
|
||||
openid String @unique
|
||||
sessionKey String? @map("session_key")
|
||||
nickname String?
|
||||
avatarUrl String? @map("avatar_url")
|
||||
points Int @default(10)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
id String @id @default(uuid())
|
||||
openid String @unique
|
||||
sessionKey String? @map("session_key")
|
||||
nickname String?
|
||||
avatarUrl String? @map("avatar_url")
|
||||
stamina Int @default(50)
|
||||
staminaUpdatedAt DateTime? @map("stamina_updated_at")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
levelProgress WxUserLevelProgress[]
|
||||
|
||||
@@ -108,6 +113,7 @@ model WxUserLevelProgress {
|
||||
userId String @map("user_id")
|
||||
levelId String @map("level_id")
|
||||
completedAt DateTime @default(now()) @map("completed_at")
|
||||
timeSpent Int @default(0) @map("time_spent")
|
||||
|
||||
user WxUser @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
level Level @relation(fields: [levelId], references: [id])
|
||||
|
||||
Reference in New Issue
Block a user