Files
SVSimServer/SVSim.Database/Models/PackConfigEntry.cs
gamer147 b78d7d6cbe feat(packs): add PackDraw* tables and IsEnabled column
Three new EF entities and a migration:
- PackDrawConfigEntry (per-pack: animation rate, has-bonus flag, special-kind label)
- PackDrawSlotRateEntry (pack/slot/tier -> rate, unique index)
- PackDrawCardWeightEntry (per-card-rate facts incl rate-less rows)

DrawSlot {General, Eighth, Bonus} and DrawTier {Bronze, Silver, Gold, Legendary, Special}.
Special collapses leader_card and limited_time_leader (verified mutually exclusive per pack).

IsEnabled column on PackConfigEntry — admin gate for synthesized stubs, distinct from
the wire-mirror IsHide.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 21:40:50 -04:00

48 lines
1.6 KiB
C#

using SVSim.Database.Common;
using SVSim.Database.Enums;
namespace SVSim.Database.Models;
/// <summary>
/// One row of /pack/info's <c>pack_config_list</c>. PK = <c>parent_gacha_id</c> (the wire id the
/// client treats as "this pack"). Child gachas and banners are owned collections — replaced
/// wholesale on importer re-runs.
/// </summary>
public class PackConfigEntry : BaseEntity<int>
{
public int BasePackId { get; set; }
public int GachaType { get; set; }
public PackCategory PackCategory { get; set; }
public int PosterType { get; set; }
public DateTime CommenceDate { get; set; }
public DateTime CompleteDate { get; set; }
public DateTime? SalesPeriodTime { get; set; }
public int SleeveId { get; set; }
public int SpecialSleeveId { get; set; }
public int OverrideDrawEffectPackId { get; set; }
public int OverrideUiEffectPackId { get; set; }
public string GachaDetail { get; set; } = string.Empty;
public bool IsHide { get; set; }
public bool IsNew { get; set; }
public bool IsPreRelease { get; set; }
public int OpenCountLimit { get; set; }
/// <summary>
/// Server admin gate. True for live-capture-derived rows; false for synthesized stubs
/// (operator opt-in per pack). Filtered in PackRepository.GetActivePacks; distinct from
/// the wire-mirror IsHide.
/// </summary>
public bool IsEnabled { get; set; } = true;
public PackGachaPointConfig? GachaPointConfig { get; set; }
public List<PackBannerEntry> Banners { get; set; } = new();
public List<PackChildGachaEntry> ChildGachas { get; set; } = new();
}