using SurrealDb.Net.Models; namespace RelayServer.Models; /// /// 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. /// public class UserRoles : Record { /// "users:keeper317" — the assignee. public required string UserId { get; set; } /// "roles:abc" — the role being granted. public required string RoleId { get; set; } /// When the assignment was made. public required DateTime AssignedAt { get; set; } }