Files
SVSimServer/SVSim.Database/Models/HomeDialogEntry.cs
gamer147 7a82f4e189 feat(home-dialog): add HomeDialogEntry entity + migration
DDL-only per migrations-are-ddl-only convention. Seeded by
SVSim.Bootstrap MyPageGlobalsImporter (T5) — no HasData.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-08 18:51:12 -04:00

32 lines
1.3 KiB
C#

using System.ComponentModel.DataAnnotations.Schema;
using SVSim.Database.Common;
namespace SVSim.Database.Models;
/// <summary>
/// One mypage home-dialog popup from /mypage/index data.home_dialog_list. Id is authored in
/// the seed file (no stable wire ID; see banners.json for the same pattern). The dialog fires
/// once per viewer per server-process lifetime — see IHomeDialogSessionTracker.
/// </summary>
public class HomeDialogEntry : BaseEntity<int>
{
public string TitleTextId { get; set; } = string.Empty;
public string Image { get; set; } = string.Empty;
/// <summary>jsonb — List&lt;HomeDialogButtonSeed&gt; serialized verbatim. Deserialized in
/// MyPageController via JsonbReadOptions.</summary>
[Column(TypeName = "jsonb")]
public string ButtonListJson { get; set; } = "[]";
public DateTime BeginTime { get; set; }
public DateTime EndTime { get; set; }
/// <summary>Wire "type" — client parser ignores it but prod sends "1". Nullable so we
/// omit when unset; serialized as a string per <c>HomeDialog.Type</c> on the DTO.</summary>
public int? Type { get; set; }
/// <summary>Tiebreaker when multiple entries are active. Higher wins; ID asc breaks
/// further ties. Each /mypage/index call emits the highest-priority unfired entry.</summary>
public int Priority { get; set; }
}