feat(campaign): CampaignController.RegisterSerialCode + DTOs + tests
Adds POST /campaign/regist_serial_code with 9 integration tests covering success path, all disqualifier conditions (unknown/disabled/expired/future/ already-redeemed/unsupported-reward-type), 401 on missing auth, and case- sensitivity. IsSupportedGiftRewardType uses gift-wire literals (1/4/9) not UserGoodsType enum values, matching GiftController.WireRewardTypeToUserGoodsType. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Campaign;
|
||||
|
||||
/// <summary>
|
||||
/// Body of <c>POST /campaign/regist_serial_code</c>. Client task:
|
||||
/// <c>MyPageCodeInputTask</c> (Shadowverse_Code_2026-05-23/Wizard/MyPageCodeInputTask.cs).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public sealed class RegisterSerialCodeRequest
|
||||
{
|
||||
/// <summary>User-typed serial code. Case-sensitive on the server.</summary>
|
||||
[JsonPropertyName("serial_code")]
|
||||
[Key("serial_code")]
|
||||
public string SerialCode { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user