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:
18
SVSim.Database/Models/TutorialPresentEntry.cs
Normal file
18
SVSim.Database/Models/TutorialPresentEntry.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One row in the tutorial-gift catalogue every fresh viewer is given at signup. Authored in
|
||||
/// <c>SVSim.Bootstrap/Data/seeds/tutorial-presents.json</c>; <see cref="PresentId"/> is the
|
||||
/// wire-stable identifier and serves as the primary key. <c>ViewerRepository.RegisterAnonymousViewer</c>
|
||||
/// reads this table and projects each row into a <see cref="ViewerPresent"/> with Source="tutorial".
|
||||
/// </summary>
|
||||
public class TutorialPresentEntry
|
||||
{
|
||||
public string PresentId { get; set; } = string.Empty;
|
||||
|
||||
public int RewardType { get; set; }
|
||||
public long RewardDetailId { get; set; }
|
||||
public long RewardCount { get; set; }
|
||||
public int? ItemType { get; set; }
|
||||
public string Message { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user