Three new EF entities for /campaign/regist_serial_code: SerialCodeEntry (code, message, window, enabled flag), SerialCodeRewardEntry (FK child, per-slot reward), and ViewerSerialCodeRedemption (composite-PK redemption record). Registered in SVSimDbContext with unique index on Code and cascade FK constraints. 3/3 persistence tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
815 B
C#
25 lines
815 B
C#
using SVSim.Database.Common;
|
|
|
|
namespace SVSim.Database.Models;
|
|
|
|
/// <summary>
|
|
/// One reward slot belonging to a <see cref="SerialCodeEntry"/>. On redemption each row
|
|
/// becomes one <see cref="ViewerPresent"/> in the player's gift inbox.
|
|
/// </summary>
|
|
public class SerialCodeRewardEntry : BaseEntity<int>
|
|
{
|
|
public int SerialCodeId { get; set; }
|
|
|
|
/// <summary>0-based ordering within the code's rewards.</summary>
|
|
public int Slot { get; set; }
|
|
|
|
/// <summary>UserGoodsType cast to int (matches the wire convention used elsewhere).</summary>
|
|
public int RewardType { get; set; }
|
|
|
|
/// <summary>Detail id for the goods. 0 for wallet currencies.</summary>
|
|
public long RewardDetailId { get; set; }
|
|
|
|
/// <summary>Positive integer count.</summary>
|
|
public int RewardCount { get; set; }
|
|
}
|