package model // AdventureLogEvent is persisted and sent over WebSocket. // Code is a phrase key (dot-separated), e.g. log.defeated_enemy, roadside.silence_loading, town_visit.merchant.bell_traveler_pack. // Args must be structured only: stable ids (enemyType, npcKey, questKey, achievementId), numbers, bools — no display sentences. type AdventureLogEvent struct { Code string `json:"code"` Args map[string]any `json:"args,omitempty"` } // AdventureLogLine is written to the DB and sent over WebSocket. // Message is legacy plain text only; new rows use Event with phrase key and empty Message. type AdventureLogLine struct { Message string `json:"message,omitempty"` Event *AdventureLogEvent `json:"event,omitempty"` } // Wandering merchant (road encounter) — stable keys for other packages (NPC labels live in client i18n). const ( WanderingMerchantNPCKey = "npc.wandering_merchant.v1" WanderingMerchantDialogueKey = "npc.wandering_merchant.dialogue.v1" )