/ GUNRPG.Core / Identity / Account.cs
Account.cs
 1  namespace GUNRPG.Core.Identity;
 2  
 3  /// <summary>
 4  /// A game account owned by an ApplicationUser.
 5  /// An account acts as the container for all of the user's Operators.
 6  /// The Account → Operator relationship is one-to-many: an account can own many operators.
 7  /// </summary>
 8  public sealed class Account
 9  {
10      public Guid Id { get; set; } = Guid.NewGuid();
11  
12      /// <summary>
13      /// The ASP.NET Identity user that owns this account.
14      /// </summary>
15      public string UserId { get; set; } = string.Empty;
16  
17      /// <summary>
18      /// Display name for the account (separate from the authentication username).
19      /// </summary>
20      public string DisplayName { get; set; } = string.Empty;
21  
22      /// <summary>
23      /// Operator IDs that belong to this account.
24      /// Operators are defined in GUNRPG.Core.Operators; the account stores the IDs only
25      /// to keep identity concerns cleanly separated from game logic.
26      /// </summary>
27      public List<Guid> OperatorIds { get; set; } = [];
28  
29      public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
30  }