namespace DorkNet.Server.Data.Entities; /// /// Per-room player role grant. Drives RoomDetails.CoOwners / /// Moderators / Hosts arrays (and their Invited* counterparts when /// is false). Each (RoomId, PlayerId, Role) /// tuple is unique — granting the same role twice is a no-op. /// public class RoomRoleEntity { public long Id { get; set; } public long RoomId { get; set; } public long PlayerId { get; set; } /// RoleKind: 0 = CoOwner, 1 = Moderator, 2 = Host. public int Role { get; set; } /// False while the invite is still pending. Accepted /// rows show up in CoOwners/Moderators/Hosts; pending rows show /// up in InvitedCoOwners/InvitedModerators/InvitedHosts. public bool Accepted { get; set; } = true; public long? GrantedByPlayerId { get; set; } public System.DateTime GrantedAt { get; set; } = System.DateTime.UtcNow; }