namespace PlotLine.Models; // Projections reference canonical manuscript IDs; none of these are map-owned story facts. public sealed class MapStoryScene { public int SceneID { get; set; } public int BookID { get; set; } public int ChapterID { get; set; } public int NarrativeOrder { get; set; } public string BookTitle { get; set; } = ""; public decimal ChapterNumber { get; set; } public string ChapterTitle { get; set; } = ""; public decimal SceneNumber { get; set; } public string SceneTitle { get; set; } = ""; public string? Summary { get; set; } public int? PrimaryLocationID { get; set; } public int? FloorPlanID { get; set; } public DateTime? StartDateTime { get; set; } public DateTime? EndDateTime { get; set; } public string TimeModeName { get; set; } = ""; public string TimeConfidenceName { get; set; } = ""; public string? RelativeTimeText { get; set; } public string? TimePrecision => TimeConfidenceName == "Confirmed" && StartDateTime.HasValue ? TimeModeName switch { "Exact DateTime" => "Timestamp", "Exact Date" => "Day", _ => null } : null; public MapStoryLocation Position { get; set; } = new(); public List CharacterIDs { get; set; } = []; public List PlotLineIDs { get; set; } = []; } public sealed class MapStoryLocation { public int? LocationID { get; set; } public string? LocationName { get; set; } public Guid? FeatureID { get; set; } public int? DetailMapID { get; set; } public int? FloorPlanID { get; set; } public string Status { get; set; } = "No Location"; public bool IsProvisional { get; set; } } public sealed class MapStoryStop { public int CharacterID { get; set; } public int SceneID { get; set; } public int Sequence { get; set; } public MapStoryLocation Position { get; set; } = new(); public string Evidence { get; set; } = ""; public DateTime? ObservedAt { get; set; } public string? TimePrecision { get; set; } } public sealed class MapJourneyNote { public int MapID { get; set; } public int CharacterID { get; set; } public int FromSceneID { get; set; } public int ToSceneID { get; set; } public Guid? RouteFeatureID { get; set; } public string? TravelMethod { get; set; } public int? TypicalMinutes { get; set; } } public sealed class MapStoryLeg { public int CharacterID { get; set; } public int FromSceneID { get; set; } public int ToSceneID { get; set; } public MapStoryLocation From { get; set; } = new(); public MapStoryLocation To { get; set; } = new(); public string? Direction { get; set; } public string? RelativeDistance { get; set; } public decimal? MeasuredDistance { get; set; } public string? Unit { get; set; } public string? TypicalTravelTime { get; set; } public int? TypicalMinutes { get; set; } public double? ElapsedMinutes { get; set; } public int EvidenceLevel { get; set; } public bool TimingObservation { get; set; } public MapJourneyNote? Note { get; set; } } public sealed class MapStoryData { public List Scenes { get; set; } = []; public List Characters { get; set; } = []; public List Appearances { get; set; } = []; public List Locations { get; set; } = []; public List Maps { get; set; } = []; public List Features { get; set; } = []; public List Relationships { get; set; } = []; public List FloorPlans { get; set; } = []; public List JourneyNotes { get; set; } = []; } public sealed class MapStoryProjection { public int UserID { get; set; } public int MapID { get; set; } public int? ScenarioID { get; set; } public List Scenes { get; set; } = []; public List Characters { get; set; } = []; public List Stops { get; set; } = []; public List Legs { get; set; } = []; public List PlotLines { get; set; } = []; public List Scenarios { get; set; } = []; } public sealed record MapStoryPerson(int CharacterID, string Name, int Importance);