feat(user-mypage): UserMyPageController + DTOs + persistence tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 16:46:49 -04:00
parent b447f5032d
commit 9ff6c70faf
4 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Text.Json.Serialization;
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.UserMyPage;
/// <summary>
/// Body of <c>POST /user_mypage/update</c>. Client task: <c>MyPageSettingUpdateTask</c>
/// (Shadowverse_Code_2026-05-23/Wizard/MyPageSettingUpdateTask.cs). Note that
/// <c>select_type</c> is the only int on the wire — id fields are strings.
/// </summary>
[MessagePackObject]
public sealed class UserMyPageUpdateRequest
{
/// <summary>BGType enum: 0=Deck, 1=CustomBG, 2=RandomBG. Client sends as an int.</summary>
[JsonPropertyName("select_type")]
[Key("select_type")]
public int SelectType { get; set; }
/// <summary>Chosen BG id when SelectType=CustomBG; empty or "0" otherwise.</summary>
[JsonPropertyName("mypage_id")]
[Key("mypage_id")]
public string MyPageId { get; set; } = "0";
/// <summary>Saved rotation pool, in slot order; client sends the full list on every call.</summary>
[JsonPropertyName("mypage_id_list")]
[Key("mypage_id_list")]
public List<string> MyPageIdList { get; set; } = new();
}

View File

@@ -0,0 +1,12 @@
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.UserMyPage;
/// <summary>
/// Empty response payload. The client's <c>MyPageSettingUpdateTask.Parse()</c> is the default
/// pass-through; server just acknowledges.
/// </summary>
[MessagePackObject(true)]
public sealed class UserMyPageUpdateResponse
{
}