Files
DorkNet/DorkNet.Server/Data/Entities/DormStateEntity.cs
T
Alexa d471b418b9 Import march-2020-03-10 from private repo (scrubbed 2026-05-27)
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).

Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
  the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces dorknet-clientpatch-{key}.zip
  for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
  dorknet-server-march_2020_03_10-win-x64.zip and
  dorknet-clientpatch-march_2020_03_10.zip as Release assets.

Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
2026-05-27 01:06:12 +03:00

32 lines
1.2 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace DorkNet.Server.Data.Entities;
/// <summary>
/// Per-player dorm state. Decouples each player's dorm save bytes from
/// the canonical RoomEntity row at <c>RoomId=1</c> (which is shared
/// across every dorm visit and would otherwise leak one player's save
/// into every other player's dorm).
///
/// One row per account that has ever entered their dorm. Created on the
/// first <c>/api/rooms/v4/details/1</c> hit and updated whenever the
/// player saves their dorm via Maker Pen.
/// </summary>
public class DormStateEntity
{
/// <summary>The owning account id. Primary key — one dorm state row
/// per player.</summary>
[Key]
public long PlayerId { get; set; }
/// <summary>Blob name for the player's most recent dorm save. Format
/// <c>dorm_p&lt;accountId&gt;_v&lt;n&gt;.dat</c>; matches the
/// <see cref="RoomDataBlobEntity.BlobName"/> stored when the upload
/// landed. Empty string before the player has saved.</summary>
[MaxLength(128)]
public string CurrentDataBlobName { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}