Files
SVSimServer/SVSim.Database/Models/TutorialPresentEntry.cs
gamer147 998402ebc3 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>
2026-06-09 09:53:10 -04:00

19 lines
777 B
C#

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;
}