using System.ComponentModel.DataAnnotations; namespace DorkNet.Server.Data.Entities; /// /// Per-player avatar state. The 2020 client persists a mix of structured /// and free-form blobs: /// /// OutfitSelections — comma-separated GUIDs of equipped /// items per slot (head, torso, legs, feet, accessories). Sent /// verbatim to POST api/avatar/v2. /// FaceFeatures — JSON blob with eyeId/eyePos/eyeScl/ /// mouthId etc. produced by the in-game face editor. /// HairColor / SkinColor — color vault GUIDs from /// the client's baked hair/skin color tables. /// SavedOutfitsJson — list of named outfit presets the /// watch's Backpack tab shows under "saved". /// EquippedItemsJson / InventoryJson — kept for the /// v3 wire shape (list of ). /// /// public class AvatarEntity { public long Id { get; set; } public long PlayerId { get; set; } // JSON-serialised list of equipped item IDs (v3 shape) public string EquippedItemsJson { get; set; } = "[]"; // JSON-serialised full inventory (v3 shape) public string InventoryJson { get; set; } = "[]"; /// v2 outfit selections — comma-separated GUIDs per slot. [MaxLength(2048)] public string OutfitSelections { get; set; } = string.Empty; /// 2023 client's OutfitSelectionsV2 blob (HHDLNAPEMGP key /// "OutfitSelectionsV2", reader EKHJKDNHOPB.txt:498-514 in the /// 2023.03.21 ISIL dump). Opaque — round-tripped verbatim. [MaxLength(8192)] public string OutfitSelectionsV2 { get; set; } = string.Empty; /// 2023 client's equipped custom avatar items — JSON array /// of {"CustomAvatarItemId":guid,"BodyPart":byte} (BGNNOMBFMLH, /// reader MKAIABAJIAJ.txt:215-258). Stored as raw JSON. public string CustomAvatarItemsJson { get; set; } = "[]"; /// v2 face features — opaque JSON written by the face /// editor; we never parse it server-side, just round-trip. [MaxLength(8192)] public string FaceFeatures { get; set; } = string.Empty; [MaxLength(64)] public string HairColor { get; set; } = string.Empty; [MaxLength(64)] public string SkinColor { get; set; } = string.Empty; /// Saved outfit presets — JSON list of named slots so the /// watch's "Saved" tab can recall them. public string SavedOutfitsJson { get; set; } = "[]"; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; public PlayerEntity? Player { get; set; } }