feat(bp): add BattlePassSeasonEntry + BattlePassRewardEntry + BattlePassTrack enum
This commit is contained in:
11
SVSim.Database/Enums/BattlePassTrack.cs
Normal file
11
SVSim.Database/Enums/BattlePassTrack.cs
Normal 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,
|
||||
}
|
||||
22
SVSim.Database/Models/BattlePassRewardEntry.cs
Normal file
22
SVSim.Database/Models/BattlePassRewardEntry.cs
Normal 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!;
|
||||
}
|
||||
20
SVSim.Database/Models/BattlePassSeasonEntry.cs
Normal file
20
SVSim.Database/Models/BattlePassSeasonEntry.cs
Normal 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 <= now < 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();
|
||||
}
|
||||
Reference in New Issue
Block a user