refactor(tutorial-presents): promote static catalogue to seed-driven TutorialPresentEntries table
The five tutorial gifts every fresh viewer is given at signup used to live as a static C# array in SVSim.Database/SeedData/TutorialPresents.cs — outside the seed-JSON pipeline used by all 40+ other globals tables. Editing a gift required a code change + rebuild instead of a JSON edit + bootstrap re-run. Now authored in SVSim.Bootstrap/Data/seeds/tutorial-presents.json and loaded into a new TutorialPresentEntries table via TutorialPresentsImporter (clear-and-rewrite, mirroring HomeDialogs). ViewerRepository.RegisterAnonymousViewer reads the table at signup and projects each row into a ViewerPresent with Source="tutorial". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
13
SVSim.Bootstrap/Models/Seed/TutorialPresentSeed.cs
Normal file
13
SVSim.Bootstrap/Models/Seed/TutorialPresentSeed.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.Bootstrap.Models.Seed;
|
||||
|
||||
public sealed class TutorialPresentSeed
|
||||
{
|
||||
[JsonPropertyName("present_id")] public string PresentId { get; set; } = "";
|
||||
[JsonPropertyName("reward_type")] public int RewardType { get; set; }
|
||||
[JsonPropertyName("reward_detail_id")] public long RewardDetailId { get; set; }
|
||||
[JsonPropertyName("reward_count")] public long RewardCount { get; set; }
|
||||
[JsonPropertyName("item_type")] public int? ItemType { get; set; }
|
||||
[JsonPropertyName("message")] public string Message { get; set; } = "";
|
||||
}
|
||||
Reference in New Issue
Block a user