mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
d471b418b9
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.
45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DorkNet.Server.Data.Entities;
|
|
|
|
/// <summary>
|
|
/// Append-only audit row written every time an admin performs a
|
|
/// privileged action (ban, unban, promote, demote, room delete,
|
|
/// MOTD change, etc.). The admin watch UI's "audit" tab reads
|
|
/// from this in reverse-chronological order.
|
|
///
|
|
/// Rows are never deleted from the application — privileged actions
|
|
/// stay on the record. Storage cost is negligible at single-server
|
|
/// scale.
|
|
/// </summary>
|
|
public class AdminActionEntity
|
|
{
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>The admin who performed the action.</summary>
|
|
public long AdminPlayerId { get; set; }
|
|
|
|
/// <summary>Free-form action name. Convention: lower-snake-case verb,
|
|
/// e.g. <c>ban_player</c>, <c>unban_player</c>, <c>promote_admin</c>,
|
|
/// <c>delete_room</c>, <c>set_motd</c>.</summary>
|
|
[MaxLength(64)]
|
|
public string Action { get; set; } = string.Empty;
|
|
|
|
/// <summary>Targeted entity type — <c>player</c>, <c>room</c>,
|
|
/// <c>system</c>. Free-form so future actions can introduce new
|
|
/// kinds without a migration.</summary>
|
|
[MaxLength(32)]
|
|
public string TargetType { get; set; } = string.Empty;
|
|
|
|
/// <summary>Numeric id of the target. <c>0</c> for system-wide
|
|
/// actions like setting the MOTD.</summary>
|
|
public long TargetId { get; set; }
|
|
|
|
/// <summary>Optional human reason the admin supplied at action
|
|
/// time. Surfaced to the audit log UI verbatim.</summary>
|
|
[MaxLength(512)]
|
|
public string Reason { get; set; } = string.Empty;
|
|
|
|
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
|
|
}
|