PlotDirector/PlotLine/Models/MapStoryModels.cs

101 lines
4.1 KiB
C#

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<int> CharacterIDs { get; set; } = [];
public List<int> 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<MapStoryScene> Scenes { get; set; } = [];
public List<Character> Characters { get; set; } = [];
public List<SceneCharacter> Appearances { get; set; } = [];
public List<LocationItem> Locations { get; set; } = [];
public List<StoryMap> Maps { get; set; } = [];
public List<MapFeature> Features { get; set; } = [];
public List<MapRelationship> Relationships { get; set; } = [];
public List<FloorPlan> FloorPlans { get; set; } = [];
public List<MapJourneyNote> JourneyNotes { get; set; } = [];
}
public sealed class MapStoryProjection
{
public int UserID { get; set; }
public int MapID { get; set; }
public int? ScenarioID { get; set; }
public List<MapStoryScene> Scenes { get; set; } = [];
public List<MapStoryPerson> Characters { get; set; } = [];
public List<MapStoryStop> Stops { get; set; } = [];
public List<MapStoryLeg> Legs { get; set; } = [];
public List<PlotLineWorkspaceLineRow> PlotLines { get; set; } = [];
public List<Scenario> Scenarios { get; set; } = [];
}
public sealed record MapStoryPerson(int CharacterID, string Name, int Importance);