Summary Update.

This commit is contained in:
2026-06-06 23:38:50 -04:00
parent dd75ca4b06
commit 2916d17868
30 changed files with 1231 additions and 21 deletions

View File

@@ -2,9 +2,21 @@ using SurrealDb.Net.Models;
namespace RelayServer.Models;
/// <summary>
/// Surreal record for the `user_roles` table. Join table linking users to roles.
///
/// Invariant: ServerBootstrapService.SetUserRoleAsync guarantees exactly one row per user.
/// Multi-role-per-user isn't currently supported by the permission ladder — adding it would
/// just be a matter of removing the bootstrap's "delete stale rows" step.
/// </summary>
public class UserRoles : Record
{
/// <summary>"users:keeper317" — the assignee.</summary>
public required string UserId { get; set; }
/// <summary>"roles:abc" — the role being granted.</summary>
public required string RoleId { get; set; }
/// <summary>When the assignment was made.</summary>
public required DateTime AssignedAt { get; set; }
}