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:
gamer147
2026-06-09 18:51:03 -04:00
parent 9f7e78691b
commit 0d32d2167b
4 changed files with 356 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Campaign;
/// <summary>
/// Success response shape. Failure path uses an anonymous <c>{ result_code = 4202 }</c>
/// (mirroring AchievementController/MissionController) and bypasses this DTO.
/// </summary>
[MessagePackObject]
public sealed class RegisterSerialCodeResponse
{
[JsonPropertyName("is_complete")]
[Key("is_complete")]
public bool IsComplete { get; set; }
}