using System.ComponentModel.DataAnnotations; namespace RacePlannerApi.Models; public class User { [Key] public Guid Id { get; set; } = Guid.NewGuid(); [Required] [EmailAddress] public string Email { get; set; } = string.Empty; [Required] public string PasswordHash { get; set; } = string.Empty; [Required] [MaxLength(100)] public string Name { get; set; } = string.Empty; [Required] public UserRole Role { get; set; } = UserRole.Participant; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; // Navigation properties public ICollection OrganizedEvents { get; set; } = new List(); public ICollection Registrations { get; set; } = new List(); } public enum UserRole { Participant, Organizer }