feat(viewer): add MyPageBgSelectType + MyPageBgId scalars + MyPageBgRotation owned collection

Adds BGType persistence (0=Deck/1=CustomBG/2=RandomBG) to Viewer via two scalar
columns and an owned collection keyed (ViewerId, Slot). Two persistence tests
confirm round-trip and zero-defaults on fresh viewers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 16:26:48 -04:00
parent 8de78ba7ed
commit ee808a60a2
4 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
namespace SVSim.Database.Models;
/// <summary>
/// One row per (viewer, slot) in the viewer's saved MyPage BG rotation pool. The client posts
/// the full pool on every <c>/user_mypage/update</c> regardless of mode, so the server overwrites
/// it atomically each time. Slot is the 0-based position; order is preserved for the
/// <c>/mypage/index</c> echo.
/// </summary>
[Owned]
public class MyPageBgRotationEntry
{
public int Slot { get; set; }
public int BgId { get; set; }
}