feat: 오픈 게임 취소와 유산 정산 경로 추가
별도 최고위험 권한으로 실행되는 원자적 취소 작업을 추가한다. 버려진 게임과 장수 기록의 보존·삭제 옵션, 오픈 원금 전액 환급 및 획득 포인트 보전율, 취소 상태와 관리자·과거기록 UI를 함께 반영한다.
This commit is contained in:
@@ -375,22 +375,74 @@ model HallOfFame {
|
||||
@@map("hall")
|
||||
}
|
||||
|
||||
enum GameHistoryStatus {
|
||||
OPEN
|
||||
COMPLETED
|
||||
ABANDONED
|
||||
}
|
||||
|
||||
enum GameCancellationHistoryMode {
|
||||
RETAIN_ABANDONED
|
||||
DELETE
|
||||
}
|
||||
|
||||
enum GameCancellationGeneralMode {
|
||||
RETAIN
|
||||
DELETE
|
||||
}
|
||||
|
||||
model GameHistory {
|
||||
id Int @id @default(autoincrement())
|
||||
serverId String @map("server_id")
|
||||
id Int @id @default(autoincrement())
|
||||
serverId String @map("server_id")
|
||||
date DateTime
|
||||
winnerNation Int? @map("winner_nation")
|
||||
map String? @map("map")
|
||||
winnerNation Int? @map("winner_nation")
|
||||
map String? @map("map")
|
||||
season Int
|
||||
scenario Int
|
||||
scenarioName String @map("scenario_name")
|
||||
env Json @default(dbgenerated("'{}'::jsonb"))
|
||||
scenarioName String @map("scenario_name")
|
||||
status GameHistoryStatus @default(OPEN)
|
||||
env Json @default(dbgenerated("'{}'::jsonb"))
|
||||
|
||||
@@unique([serverId])
|
||||
@@index([date])
|
||||
@@map("ng_games")
|
||||
}
|
||||
|
||||
model GameInheritanceBaseline {
|
||||
serverId String @map("server_id")
|
||||
userId String @map("user_id")
|
||||
openingPoint Float @map("opening_point")
|
||||
source String @default("OPENING")
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@id([serverId, userId])
|
||||
@@index([userId, createdAt])
|
||||
@@map("game_inheritance_baseline")
|
||||
}
|
||||
|
||||
model GameCancellation {
|
||||
id String @id
|
||||
serverId String @unique @map("server_id")
|
||||
originalSeason Int @map("original_season")
|
||||
scenario Int
|
||||
scenarioName String @map("scenario_name")
|
||||
openedAt DateTime @map("opened_at")
|
||||
cancelledAt DateTime @map("cancelled_at")
|
||||
cancelledBy String @map("cancelled_by")
|
||||
reason String
|
||||
historyMode GameCancellationHistoryMode @map("history_mode")
|
||||
generalMode GameCancellationGeneralMode @map("general_mode")
|
||||
earnedPointRetentionPercent Int @map("earned_point_retention_percent")
|
||||
participantCount Int @map("participant_count")
|
||||
preservedGeneralCount Int @map("preserved_general_count")
|
||||
settlement Json @default(dbgenerated("'{}'::jsonb"))
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([cancelledAt])
|
||||
@@map("game_cancellation")
|
||||
}
|
||||
|
||||
model OldNation {
|
||||
id Int @id @default(autoincrement())
|
||||
serverId String @map("server_id")
|
||||
|
||||
Reference in New Issue
Block a user