mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
4edf25b2d5
Targets Rec Room 2020.12.18 client.
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 the dorknet-clientpatch-{key}.zip
Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
on v1-december-* tag push.
Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
namespace DorkNet.Server.Data.Entities;
|
|
|
|
/// <summary>
|
|
/// Single-row table holding the dorm community board state. Replaces
|
|
/// <c>data/community_board.json</c> on disk + in-memory cache so admin
|
|
/// edits propagate across replicas without a file-watcher invalidation
|
|
/// dance.
|
|
///
|
|
/// Only one row exists, with <see cref="Id"/> = 1. Reading is a single
|
|
/// SELECT (cheap; the board is one document, not paginated). Writing
|
|
/// is a single UPDATE — no synchronization needed because there's only
|
|
/// ever one row to contend on, and admin edits are rare.
|
|
/// </summary>
|
|
public class CommunityBoardEntity
|
|
{
|
|
/// <summary>Always 1. We model it as an int PK rather than a
|
|
/// composite or singleton-table pattern because EF Core needs a key
|
|
/// to track changes; pinning to id=1 keeps the upsert pattern
|
|
/// simple.</summary>
|
|
public int Id { get; set; } = 1;
|
|
|
|
/// <summary>JSON-serialised <c>CommunityBoardState</c>. Stored as
|
|
/// text rather than jsonb because we never query inside it — it's
|
|
/// loaded as a single blob and round-tripped to the client.</summary>
|
|
public string Json { get; set; } = "{}";
|
|
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|