feat(bp): add BattlePassSeasonEntry + BattlePassRewardEntry + BattlePassTrack enum

This commit is contained in:
gamer147
2026-05-26 22:04:10 -04:00
parent 8f07afce83
commit 34de3d53ad
3 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
namespace SVSim.Database.Enums;
/// <summary>
/// Reward track on a battle pass season. Wire shape uses the section keys
/// <c>"normal"</c> and <c>"premium"</c> under <c>reward_info</c>.
/// </summary>
public enum BattlePassTrack
{
Normal = 0,
Premium = 1,
}

View File

@@ -0,0 +1,22 @@
using SVSim.Database.Common;
using SVSim.Database.Enums;
namespace SVSim.Database.Models;
/// <summary>
/// One reward cell on a battle pass season (track × level). Capture shows at most one
/// reward per (season, track, level) — enforced by unique index in DbContext.
/// RewardType integers come from <see cref="UserGoodsType"/>.
/// </summary>
public class BattlePassRewardEntry : BaseEntity<long>
{
public int SeasonId { get; set; }
public BattlePassTrack Track { get; set; }
public int Level { get; set; }
public int RewardType { get; set; }
public long RewardDetailId { get; set; }
public int RewardNumber { get; set; }
public bool IsAppealExclusion { get; set; }
public BattlePassSeasonEntry Season { get; set; } = null!;
}

View File

@@ -0,0 +1,20 @@
using SVSim.Database.Common;
namespace SVSim.Database.Models;
/// <summary>
/// One battle pass season. Active season is resolved by time-window
/// (StartDate &lt;= now &lt; EndDate). Rewards are loaded via Rewards collection.
/// </summary>
public class BattlePassSeasonEntry : BaseEntity<int>
{
public string Name { get; set; } = "";
public int MaxLevel { get; set; }
public DateTimeOffset StartDate { get; set; }
public DateTimeOffset EndDate { get; set; }
public bool CanPurchase { get; set; }
public int PriceCrystal { get; set; }
public string Description { get; set; } = "";
public List<BattlePassRewardEntry> Rewards { get; set; } = new();
}