feat: GamePrisma를 사용하여 데이터베이스 클라이언트 및 관련 타입 정의 업데이트

This commit is contained in:
2026-01-05 15:13:59 +00:00
parent c3b6833172
commit b1f2523fa3
7 changed files with 47 additions and 216 deletions
+5 -4
View File
@@ -2,6 +2,7 @@ import type {
DatabaseClient,
GeneralTurnRow,
NationTurnRow,
InputJsonValue,
} from '../context.js';
export const DEFAULT_TURN_ACTION = '휴식';
@@ -10,13 +11,13 @@ export const MAX_NATION_TURNS = 12;
export interface ReservedTurnEntry {
action: string;
args: Record<string, unknown>;
args: InputJsonValue;
}
export interface ReservedTurnView {
index: number;
action: string;
args: Record<string, unknown>;
args: InputJsonValue;
}
const isRecord = (value: unknown): value is Record<string, unknown> =>
@@ -25,8 +26,8 @@ const isRecord = (value: unknown): value is Record<string, unknown> =>
const normalizeAction = (action: string | null | undefined): string =>
action && action.length > 0 ? action : DEFAULT_TURN_ACTION;
const normalizeArgs = (args: unknown): Record<string, unknown> =>
isRecord(args) ? args : {};
const normalizeArgs = (args: unknown): InputJsonValue =>
isRecord(args) ? (args as InputJsonValue) : {};
const createDefaultEntry = (): ReservedTurnEntry => ({
action: DEFAULT_TURN_ACTION,