feat: 외교부 기능 추가 및 외교 문서 관련 데이터베이스 모델 생성

This commit is contained in:
2026-01-28 15:35:17 +00:00
parent bebb0de3c4
commit 87e4639663
8 changed files with 1003 additions and 1 deletions
+26
View File
@@ -37,6 +37,13 @@ enum AuctionType {
UNIQUE_ITEM
}
enum DiplomacyLetterState {
PROPOSED
ACTIVATED
CANCELLED
REPLACED
}
model WorldState {
id Int @id @default(autoincrement())
scenarioCode String @map("scenario_code")
@@ -187,6 +194,25 @@ model Diplomacy {
@@map("diplomacy")
}
model DiplomacyLetter {
id Int @id @default(autoincrement())
srcNationId Int @map("src_nation_id")
destNationId Int @map("dest_nation_id")
prevId Int? @map("prev_id")
state DiplomacyLetterState @default(PROPOSED)
textBrief String @map("text_brief")
textDetail String @map("text_detail")
date DateTime @default(now()) @map("date")
srcSignerId Int @map("src_signer")
destSignerId Int? @map("dest_signer")
aux Json @default(dbgenerated("'{}'::jsonb"))
@@index([srcNationId, destNationId])
@@index([destNationId, srcNationId])
@@index([state, date])
@@map("diplomacy_letter")
}
model Event {
id Int @id @default(autoincrement())
targetCode String @map("target_code")