Files
DorkNet/DorkNet.Server/Data/Entities/ChatThreadEntity.cs
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-thread metadata for chat: name (for group chats), creator, and
/// timestamps. Rows here are sparse — a two-person DM doesn't need
/// one unless the players want a custom thread name. Group chats
/// always have a row so the member set + name are persisted.
/// </summary>
public class ChatThreadEntity
{
public long Id { get; set; }
/// <summary>Canonical thread key (matches <c>ChatMessageEntity.ThreadKey</c>).
/// Format: <c>dm:&lt;low&gt;:&lt;high&gt;</c> for DMs,
/// <c>group:&lt;guid&gt;</c> for group chats, <c>room:&lt;id&gt;</c> for room-wide.</summary>
[MaxLength(96)]
public string ThreadKey { get; set; } = string.Empty;
/// <summary>Optional custom name. DMs default to empty (watch renders
/// "Chat with &lt;username&gt;" client-side); group chats persist a
/// name set via <c>PUT thread/{id}/rename</c>.</summary>
[MaxLength(128)]
public string Name { get; set; } = string.Empty;
public long CreatorPlayerId { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}