namespace CSR.Infrastructure.Persistence;

public class User
{
  public int Id { get; set; }
  public required string Username { get; set; }
  public required string Email { get; set; }
  public required string PasswordHash { get; set; }
  public required int RoleId { get; set; }

  // Navigation property
  public Role Role { get; set; } = null!;

  // prevent direct instantiation
  // use UserService to create a new user
  internal User() { }
}
