feat: 로그 시스템 구현 및 관련 클래스 추가

This commit is contained in:
2025-12-29 08:40:01 +00:00
parent e0eb768e2e
commit 27cc016804
13 changed files with 630 additions and 11 deletions
+37
View File
@@ -6,6 +6,22 @@ datasource db {
provider = "postgresql"
}
enum LogScope {
SYSTEM
NATION
GENERAL
USER
}
enum LogCategory {
HISTORY
SUMMARY
ACTION
BATTLE_BRIEF
BATTLE_DETAIL
USER
}
model WorldState {
id Int @id @default(autoincrement())
scenarioCode String @map("scenario_code")
@@ -133,3 +149,24 @@ model Event {
@@map("event")
}
model LogEntry {
id Int @id @default(autoincrement())
scope LogScope
category LogCategory
subType String? @map("sub_type")
year Int
month Int
text String
generalId Int? @map("general_id")
nationId Int? @map("nation_id")
userId Int? @map("user_id")
meta Json @default(dbgenerated("'{}'::jsonb"))
createdAt DateTime @default(now()) @map("created_at")
@@index([scope, category, id])
@@index([generalId, category, id])
@@index([nationId, category, id])
@@index([userId, category, id])
@@map("log_entry")
}