using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace RacePlannerApi.Models; public class Event { [Key] public Guid Id { get; set; } = Guid.NewGuid(); [Required] [MaxLength(200)] public string Name { get; set; } = string.Empty; [MaxLength(2000)] public string Description { get; set; } = string.Empty; [Required] public DateTime EventDate { get; set; } [Required] [MaxLength(500)] public string Location { get; set; } = string.Empty; public EventStatus Status { get; set; } = EventStatus.Draft; [MaxLength(100)] public string? Category { get; set; } public List Tags { get; set; } = new List(); public int? MaxParticipants { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; // Foreign keys [Required] public Guid OrganizerId { get; set; } [ForeignKey("OrganizerId")] public User Organizer { get; set; } = null!; // Navigation properties public ICollection Registrations { get; set; } = new List(); public ICollection Announcements { get; set; } = new List(); } public enum EventStatus { Draft, Published, Cancelled, Completed }