fix: 定时任务修复+管理后台Task7支持 (Task4外键修复, Task7管理员邮箱动态查询, Task5限流防护, Task7加入SCRIPT_MAP)
This commit is contained in:
@@ -200,9 +200,11 @@ model User {
|
||||
roleId Int? @map("role_id")
|
||||
points Int @default(0)
|
||||
level UserLevel @default(LV01)
|
||||
isBot Boolean @default(false) @map("is_bot")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
botConfig BotConfig?
|
||||
assignedRole Role? @relation(fields: [roleId], references: [id])
|
||||
favorites Favorite[]
|
||||
browsingHistory BrowsingHistory[]
|
||||
@@ -625,3 +627,33 @@ model ForumPost {
|
||||
@@map("forum_posts")
|
||||
}
|
||||
|
||||
model BotConfig {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int @unique @map("user_id")
|
||||
displayName String @map("display_name") @db.VarChar(50)
|
||||
personality Json
|
||||
primaryForums Json @map("primary_forums")
|
||||
activeHours Json @map("active_hours")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
memories BotMemory[]
|
||||
|
||||
@@map("bot_configs")
|
||||
}
|
||||
|
||||
model BotMemory {
|
||||
id Int @id @default(autoincrement())
|
||||
botId Int @map("bot_id")
|
||||
memoryType String @map("memory_type") @db.VarChar(20)
|
||||
content Json
|
||||
importance Float @default(0.5)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
bot BotConfig @relation(fields: [botId], references: [id])
|
||||
|
||||
@@index([botId, memoryType, createdAt])
|
||||
@@map("bot_memories")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user