using System.ComponentModel.DataAnnotations; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Rendering; using PlotLine.Models; namespace PlotLine.ViewModels; public sealed class ProjectEditViewModel { public int ProjectID { get; set; } [Required, StringLength(200)] [Display(Name = "Project / Series name")] public string ProjectName { get; set; } = string.Empty; public string? Description { get; set; } } public sealed class ProjectDetailViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Books { get; set; } = []; } public sealed class BookEditViewModel { public int BookID { get; set; } public int ProjectID { get; set; } [Required, StringLength(200)] [Display(Name = "Book title")] public string BookTitle { get; set; } = string.Empty; [Display(Name = "Book number")] public int BookNumber { get; set; } = 1; public string? Description { get; set; } public Project? Project { get; set; } } public sealed class BookDetailViewModel { public Project Project { get; set; } = new(); public Book Book { get; set; } = new(); public IReadOnlyList Chapters { get; set; } = []; } public sealed class ChapterEditViewModel { public int ChapterID { get; set; } public int BookID { get; set; } [Display(Name = "Chapter number")] public decimal ChapterNumber { get; set; } = 1; [Required, StringLength(200)] [Display(Name = "Chapter title")] public string ChapterTitle { get; set; } = string.Empty; public string? Summary { get; set; } [Display(Name = "Revision status")] public int RevisionStatusID { get; set; } public Book? Book { get; set; } public Project? Project { get; set; } public IReadOnlyList RevisionStatuses { get; set; } = []; } public sealed class ChapterDetailViewModel { public Project Project { get; set; } = new(); public Book Book { get; set; } = new(); public Chapter Chapter { get; set; } = new(); public IReadOnlyList Scenes { get; set; } = []; } public sealed class SceneEditViewModel { public int SceneID { get; set; } public int ChapterID { get; set; } [Display(Name = "Scene number")] public decimal SceneNumber { get; set; } = 1; [Required, StringLength(200)] [Display(Name = "Scene title")] public string SceneTitle { get; set; } = string.Empty; public string? Summary { get; set; } [Display(Name = "Time mode")] public int TimeModeID { get; set; } [Display(Name = "Start date/time")] public DateTime? StartDateTime { get; set; } [Display(Name = "End date/time")] public DateTime? EndDateTime { get; set; } [Display(Name = "Duration")] public decimal? DurationAmount { get; set; } [Display(Name = "Duration unit")] public int? DurationUnitID { get; set; } [Display(Name = "Relative time")] public string? RelativeTimeText { get; set; } [Display(Name = "Time confidence")] public int TimeConfidenceID { get; set; } [Display(Name = "Purpose notes")] public string? ScenePurposeNotes { get; set; } [Display(Name = "Outcome notes")] public string? SceneOutcomeNotes { get; set; } [Display(Name = "Revision status")] public int RevisionStatusID { get; set; } [Display(Name = "Primary location")] public int? PrimaryLocationID { get; set; } [Display(Name = "Scene purposes")] public List SelectedPurposeTypeIds { get; set; } = []; public List Metrics { get; set; } = []; public IReadOnlyList ThreadEvents { get; set; } = []; public ThreadEventCreateViewModel NewThreadEvent { get; set; } = new(); public IReadOnlyList AssetEvents { get; set; } = []; public IReadOnlyList AssetCustodyEvents { get; set; } = []; public IReadOnlyList SceneAssetLocations { get; set; } = []; public AssetEventCreateViewModel NewAssetEvent { get; set; } = new(); public AssetCustodyCreateViewModel NewAssetCustodyEvent { get; set; } = new(); public SceneAssetLocationCreateViewModel NewSceneAssetLocation { get; set; } = new(); public IReadOnlyList SceneCharacters { get; set; } = []; public IReadOnlyList CharacterAttributeEvents { get; set; } = []; public IReadOnlyList CharacterKnowledge { get; set; } = []; public IReadOnlyList RelationshipEvents { get; set; } = []; public SceneCharacterCreateViewModel NewSceneCharacter { get; set; } = new(); public CharacterAttributeEventCreateViewModel NewCharacterAttributeEvent { get; set; } = new(); public CharacterKnowledgeCreateViewModel NewCharacterKnowledge { get; set; } = new(); public RelationshipEventCreateViewModel NewRelationshipEvent { get; set; } = new(); public IReadOnlyList PlotLineOptions { get; set; } = []; public IReadOnlyList PlotThreadOptions { get; set; } = []; public IReadOnlyList ThreadTypeOptions { get; set; } = []; public IReadOnlyList ThreadEventTypeOptions { get; set; } = []; public IReadOnlyList AssetOptions { get; set; } = []; public IReadOnlyList AssetKindOptions { get; set; } = []; public IReadOnlyList AssetStateOptions { get; set; } = []; public IReadOnlyList AssetEventTypeOptions { get; set; } = []; public IReadOnlyList AssetCustodyEventTypeOptions { get; set; } = []; public IReadOnlyList CustodyRoleOptions { get; set; } = []; public IReadOnlyList CharacterOptions { get; set; } = []; public IReadOnlyList CharacterRoleOptions { get; set; } = []; public IReadOnlyList PresenceTypeOptions { get; set; } = []; public IReadOnlyList CharacterAttributeTypeOptions { get; set; } = []; public IReadOnlyList KnowledgeStateOptions { get; set; } = []; public IReadOnlyList RelationshipOptions { get; set; } = []; public IReadOnlyList RelationshipTypeOptions { get; set; } = []; public IReadOnlyList RelationshipStateOptions { get; set; } = []; public IReadOnlyList LocationOptions { get; set; } = []; public IReadOnlyList SceneOptions { get; set; } = []; public IReadOnlyList ChapterOptions { get; set; } = []; public IReadOnlyList SceneDependencyTypeOptions { get; set; } = []; public IReadOnlyList AssetDependencyMessages { get; set; } = []; public IReadOnlyList LocationConsistencyMessages { get; set; } = []; public IReadOnlyList Warnings { get; set; } = []; public IReadOnlyList DependenciesThisSceneNeeds { get; set; } = []; public IReadOnlyList DependenciesNeedingThisScene { get; set; } = []; public SceneDependencyCreateViewModel NewDependency { get; set; } = new(); public SceneMoveRequestViewModel MoveRequest { get; set; } = new(); public SceneWorkflow Workflow { get; set; } = new(); public IReadOnlyList Notes { get; set; } = []; public IReadOnlyList ChecklistItems { get; set; } = []; public IReadOnlyList Attachments { get; set; } = []; public SceneNoteEditViewModel NewNote { get; set; } = new(); public SceneChecklistItemEditViewModel NewChecklistItem { get; set; } = new(); public SceneAttachmentEditViewModel NewAttachment { get; set; } = new(); public IReadOnlyList SceneNoteTypeOptions { get; set; } = []; public IReadOnlyList SceneAttachmentTypeOptions { get; set; } = []; public IReadOnlyList DraftStatusOptions { get; set; } = []; public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public bool ReturnToTimeline { get; set; } public Chapter? Chapter { get; set; } public Book? Book { get; set; } public Project? Project { get; set; } public IReadOnlyList RevisionStatuses { get; set; } = []; public IReadOnlyList TimeModes { get; set; } = []; public IReadOnlyList DurationUnits { get; set; } = []; public IReadOnlyList TimeConfidences { get; set; } = []; public IReadOnlyList ScenePurposeTypes { get; set; } = []; } public sealed class SceneWorkflowEditViewModel { public int SceneID { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public string DraftStatus { get; set; } = "Planned"; public int? EstimatedWordCount { get; set; } public int? ActualWordCount { get; set; } public DateTime? DraftedDate { get; set; } public DateTime? LastWorkedOn { get; set; } public bool ReadyForDraft { get; set; } public bool ReadyForRevision { get; set; } public bool ReadyForPolish { get; set; } public bool IsBlocked { get; set; } public string? BlockedReason { get; set; } public int? Priority { get; set; } } public sealed class SceneNoteEditViewModel { public int SceneNoteID { get; set; } public int SceneID { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public int SceneNoteTypeID { get; set; } public string? NoteTitle { get; set; } public string NoteText { get; set; } = string.Empty; public int? SortOrder { get; set; } public bool IsPinned { get; set; } public bool IsResolved { get; set; } } public sealed class SceneChecklistItemEditViewModel { public int SceneChecklistItemID { get; set; } public int SceneID { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public string ItemText { get; set; } = string.Empty; public bool IsCompleted { get; set; } public int? SortOrder { get; set; } } public sealed class SceneAttachmentEditViewModel { public int SceneAttachmentID { get; set; } public int SceneID { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public int SceneAttachmentTypeID { get; set; } public string Title { get; set; } = string.Empty; public string? FilePath { get; set; } public string? ExternalUrl { get; set; } public string? Notes { get; set; } public IFormFile? UploadedFile { get; set; } } public sealed class ChapterGoalEditViewModel { public int ChapterGoalID { get; set; } public int ChapterID { get; set; } public string? GoalSummary { get; set; } public string? EmotionalGoal { get; set; } public string? ReaderTakeaway { get; set; } public string? MustInclude { get; set; } public string? RisksOrConcerns { get; set; } } public sealed class ChapterWorkflowViewModel { public Project Project { get; set; } = new(); public Book Book { get; set; } = new(); public Chapter Chapter { get; set; } = new(); public ChapterGoal Goal { get; set; } = new(); public IReadOnlyList Scenes { get; set; } = []; } public sealed class WriterDashboardViewModel { public int? ProjectID { get; set; } public IReadOnlyList ProjectOptions { get; set; } = []; public IReadOnlyList ContinueWriting { get; set; } = []; public IReadOnlyList NeedsAttention { get; set; } = []; public IReadOnlyList RevisionQueue { get; set; } = []; public IReadOnlyList PolishingQueue { get; set; } = []; public IReadOnlyList StoryHealthReminders { get; set; } = []; } public sealed class CharacterArcViewModel { public Project Project { get; set; } = new(); public Character Character { get; set; } = new(); public IReadOnlyList ArcPoints { get; set; } = []; public IReadOnlyList RelationshipEvents { get; set; } = []; public IReadOnlyList KnowledgeEvents { get; set; } = []; public IReadOnlyList Issues { get; set; } = []; } public sealed class RelationshipEvolutionViewModel { public Project Project { get; set; } = new(); public CharacterRelationship Relationship { get; set; } = new(); public IReadOnlyList Events { get; set; } = []; public IReadOnlyList Issues { get; set; } = []; } public sealed class KnowledgeTimelineViewModel { public Project Project { get; set; } = new(); public Character Character { get; set; } = new(); public IReadOnlyList KnowledgeEvents { get; set; } = []; public IReadOnlyList Issues { get; set; } = []; } public sealed class StoryDynamicsViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Pairings { get; set; } = []; public IReadOnlyList Issues { get; set; } = []; } public sealed class ScenarioListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Scenarios { get; set; } = []; } public sealed class ScenarioCreateViewModel { public int ProjectID { get; set; } public int? BookID { get; set; } public string ScenarioName { get; set; } = string.Empty; public string? Description { get; set; } public IReadOnlyList BookOptions { get; set; } = []; } public sealed class ScenarioTimelineViewModel { public Project Project { get; set; } = new(); public Scenario Scenario { get; set; } = new(); public IReadOnlyList Books { get; set; } = []; public IReadOnlyList Chapters { get; set; } = []; public IReadOnlyList Scenes { get; set; } = []; public IReadOnlyList Warnings { get; set; } = []; public IReadOnlyList ChapterOptions { get; set; } = []; } public sealed class ScenarioCompareViewModel { public Project Project { get; set; } = new(); public Scenario Scenario { get; set; } = new(); public IReadOnlyList MovedScenes { get; set; } = []; public IReadOnlyList ScenarioWarnings { get; set; } = []; } public sealed class ArchivedItemsViewModel { public int? ProjectID { get; set; } public string? EntityType { get; set; } public IReadOnlyList ProjectOptions { get; set; } = []; public IReadOnlyList EntityTypeOptions { get; set; } = []; public IReadOnlyList Items { get; set; } = []; } public sealed class Phase1AcceptanceViewModel { public int? ProjectID { get; set; } public string? ProjectName { get; set; } public IReadOnlyList ProjectOptions { get; set; } = []; public IReadOnlyList Items { get; set; } = []; public int PassCount => Items.Count(x => x.Status == "Pass"); public int ReviewCount => Items.Count(x => x.Status == "Review"); public int BlockedCount => Items.Count(x => x.Status == "Blocked"); } public sealed class TimelineViewModel { public Project Project { get; set; } = new(); public ProjectTimelineSettings Settings { get; set; } = new(); public int? SelectedBookID { get; set; } public int? SelectedSceneID { get; set; } public SceneEditViewModel? SelectedScene { get; set; } public TimelineFilterViewModel Filter { get; set; } = new(); public IReadOnlyList Books { get; set; } = []; public IReadOnlyList BookOptions { get; set; } = []; public IReadOnlyList ChapterOptions { get; set; } = []; public IReadOnlyList ChapterFromOptions { get; set; } = []; public IReadOnlyList ChapterToOptions { get; set; } = []; public IReadOnlyList SceneOptions { get; set; } = []; public IReadOnlyList SceneFromOptions { get; set; } = []; public IReadOnlyList SceneToOptions { get; set; } = []; public IReadOnlyList PlotLineOptions { get; set; } = []; public IReadOnlyList PlotThreadOptions { get; set; } = []; public IReadOnlyList AssetOptions { get; set; } = []; public IReadOnlyList QuickAddAssets { get; set; } = []; public IReadOnlyList AssetEventTypeOptions { get; set; } = []; public IReadOnlyList AssetStateOptions { get; set; } = []; public IReadOnlyList AssetDependencyTypeOptions { get; set; } = []; public IReadOnlyList CharacterOptions { get; set; } = []; public IReadOnlyList QuickAddCharacters { get; set; } = []; public IReadOnlyList CharacterRoleOptions { get; set; } = []; public IReadOnlyList PresenceTypeOptions { get; set; } = []; public IReadOnlyList PovCharacterOptions { get; set; } = []; public IReadOnlyList LocationOptions { get; set; } = []; public IReadOnlyList QuickAddLocations { get; set; } = []; public IReadOnlyList LocationRelationshipTypeOptions { get; set; } = []; public IReadOnlyList WarningSeverityOptions { get; set; } = []; public IReadOnlyList WarningTypeOptions { get; set; } = []; public IReadOnlyList RevisionStatusOptions { get; set; } = []; public IReadOnlyList ScenePurposeOptions { get; set; } = []; public IReadOnlyList ViewPresets { get; set; } = []; public IReadOnlyList OrderedScenes { get; set; } = []; public IReadOnlyList MetricGraphs { get; set; } = []; public IReadOnlyList PlotLanes { get; set; } = []; public IReadOnlyList AssetLanes { get; set; } = []; public IReadOnlyList CharacterLanes { get; set; } = []; public IReadOnlySet MatchingSceneIDs { get; set; } = new HashSet(); public IReadOnlySet FocusSceneIDs { get; set; } = new HashSet(); public IReadOnlyDictionary ScenePovLabels { get; set; } = new Dictionary(); public string? FocusLabel { get; set; } public ContinuityValidationSummary? LastValidationSummary { get; set; } } public sealed class TimelineSettingsViewModel { public int ProjectID { get; set; } public string ProjectName { get; set; } = string.Empty; public bool ShowSceneCards { get; set; } = true; public bool ShowMetricShape { get; set; } = true; public bool ShowPlotLines { get; set; } = true; public bool ShowStoryAssets { get; set; } = true; public bool ShowCharacterAppearances { get; set; } = true; public bool ShowWarnings { get; set; } = true; public List SelectedMetricTypeIDs { get; set; } = []; public IReadOnlyList MetricOptions { get; set; } = []; } public sealed class TimelineMetricSettingOptionViewModel { public int MetricTypeID { get; set; } public string MetricName { get; set; } = string.Empty; public string? Description { get; set; } public int SortOrder { get; set; } public bool IsSelected { get; set; } } public sealed class StoryBibleViewModel { public Project Project { get; set; } = new(); public string? Query { get; set; } public IReadOnlyList Characters { get; set; } = []; public IReadOnlyList PlotThreads { get; set; } = []; public IReadOnlyList Assets { get; set; } = []; public IReadOnlyList Relationships { get; set; } = []; public IReadOnlyList Locations { get; set; } = []; public IReadOnlyList Timeline { get; set; } = []; public IReadOnlyList OpenQuestions { get; set; } = []; public IReadOnlyList RevisionItems { get; set; } = []; public IReadOnlyList SearchResults { get; set; } = []; } public sealed class TimelineFilterViewModel { public int ProjectID { get; set; } public int? BookID { get; set; } public int? SelectedSceneID { get; set; } public int? ChapterFromID { get; set; } public int? ChapterToID { get; set; } public int? SceneFromID { get; set; } public int? SceneToID { get; set; } public int? PlotLineID { get; set; } public int? PlotThreadID { get; set; } public int? StoryAssetID { get; set; } public int? CharacterID { get; set; } public int? LocationID { get; set; } public int? WarningSeverityID { get; set; } public int? WarningTypeID { get; set; } public int? RevisionStatusID { get; set; } public int? ScenePurposeTypeID { get; set; } public int? POVCharacterID { get; set; } public string? FocusType { get; set; } public int? FocusID { get; set; } public bool ShowSceneCards { get; set; } = true; public bool ShowPlotLines { get; set; } = true; public bool ShowAssets { get; set; } = true; public bool ShowCharacters { get; set; } = true; public bool ShowLocations { get; set; } = true; public bool ShowWarnings { get; set; } = true; public bool ShowMetrics { get; set; } = true; public bool ShowWarningsOnly { get; set; } public bool IncludeDismissedWarnings { get; set; } public bool IncludeIntentionalWarnings { get; set; } } public sealed class TimelinePresetSaveViewModel { public int ProjectID { get; set; } public int? BookID { get; set; } public string PresetName { get; set; } = string.Empty; public TimelineFilterViewModel Filter { get; set; } = new(); public string VisibilityJson { get; set; } = "{}"; } public sealed class TimelineSceneDropMoveViewModel { public int ProjectID { get; set; } public int? BookID { get; set; } public int SceneID { get; set; } public int AnchorSceneID { get; set; } public int? TargetChapterID { get; set; } public string Position { get; set; } = "After"; public int? ReturnSelectedSceneID { get; set; } } public sealed class TimelineSceneCharacterDropViewModel { public int SceneID { get; set; } public int? CharacterID { get; set; } public int? RoleInSceneTypeID { get; set; } public int? PresenceTypeID { get; set; } public int? LocationID { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class TimelineAssetEventDropViewModel { public int SceneID { get; set; } public int? StoryAssetID { get; set; } public int AssetEventTypeID { get; set; } public int? FromStateID { get; set; } public int? ToStateID { get; set; } public string EventTitle { get; set; } = string.Empty; public string? EventDescription { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } public int? LocationID { get; set; } public string? CustodyNote { get; set; } } public sealed class TimelineAssetDependencyDropViewModel { public int ProjectID { get; set; } public int SourceAssetID { get; set; } public int TargetAssetID { get; set; } public int AssetDependencyTypeID { get; set; } public int? SourceRequiredStateID { get; set; } public int? TargetBlockedStateID { get; set; } public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class TimelineLocationRelationshipDropViewModel { public int ProjectID { get; set; } public int FromLocationID { get; set; } public int ToLocationID { get; set; } public int LocationRelationshipTypeID { get; set; } public bool IsBidirectional { get; set; } public int? Strength { get; set; } public bool CanHearNormalSpeech { get; set; } public bool CanHearLoudNoise { get; set; } public bool CanSeeMovement { get; set; } public bool CanSeeClearly { get; set; } public bool CanTravelDirectly { get; set; } public string? Notes { get; set; } public int? ReturnBookID { get; set; } } public sealed class BookTimelineViewModel { public Book Book { get; set; } = new(); public IReadOnlyList Chapters { get; set; } = []; } public sealed class ChapterTimelineViewModel { public Chapter Chapter { get; set; } = new(); public IReadOnlyList Scenes { get; set; } = []; } public sealed class SceneMetricInputViewModel { public int MetricTypeID { get; set; } public string MetricName { get; set; } = string.Empty; public string? Description { get; set; } public int MinValue { get; set; } public int MaxValue { get; set; } public int Value { get; set; } public string? Notes { get; set; } } public sealed class MetricGraphViewModel { public int MetricTypeID { get; set; } public string MetricName { get; set; } = string.Empty; public IReadOnlyList Points { get; set; } = []; } public sealed class MetricGraphPointViewModel { public int SceneID { get; set; } public decimal SceneNumber { get; set; } public string SceneTitle { get; set; } = string.Empty; public int Value { get; set; } public int Percent { get; set; } } public sealed class PlotLineEditViewModel { public int PlotLineID { get; set; } public int ProjectID { get; set; } [Required, StringLength(200)] [Display(Name = "Plot line name")] public string PlotLineName { get; set; } = string.Empty; [Display(Name = "Type")] public int PlotLineTypeID { get; set; } public int? BookID { get; set; } public string? Description { get; set; } [Display(Name = "Parent plot line")] public int? ParentPlotLineID { get; set; } [Display(Name = "Sort order")] public int SortOrder { get; set; } [Display(Name = "Colour")] public string Colour { get; set; } = "#2f6f63"; [Display(Name = "Main plot")] public bool IsMainPlot { get; set; } [Display(Name = "Visible on timeline")] public bool IsVisibleOnTimeline { get; set; } = true; public Project? Project { get; set; } public IReadOnlyList PlotLineTypes { get; set; } = []; public IReadOnlyList BookOptions { get; set; } = []; public IReadOnlyList ParentPlotLineOptions { get; set; } = []; } public sealed class PlotLineListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList PlotLines { get; set; } = []; } public sealed class PlotThreadEditViewModel { public int PlotThreadID { get; set; } public int ProjectID { get; set; } [Display(Name = "Plot line")] public int PlotLineID { get; set; } [Required, StringLength(200)] [Display(Name = "Thread title")] public string ThreadTitle { get; set; } = string.Empty; [Display(Name = "Type")] public int ThreadTypeID { get; set; } [Display(Name = "Status")] public int ThreadStatusID { get; set; } [Range(1, 10)] public int Importance { get; set; } = 5; public string? Summary { get; set; } [Display(Name = "Introduced scene")] public int? IntroducedSceneID { get; set; } [Display(Name = "Planned resolution scene")] public int? PlannedResolutionSceneID { get; set; } [Display(Name = "Actual resolution scene")] public int? ActualResolutionSceneID { get; set; } public Project? Project { get; set; } public IReadOnlyList PlotLineOptions { get; set; } = []; public IReadOnlyList ThreadTypeOptions { get; set; } = []; public IReadOnlyList ThreadStatusOptions { get; set; } = []; public IReadOnlyList SceneOptions { get; set; } = []; } public sealed class PlotThreadListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList PlotThreads { get; set; } = []; } public sealed class ThreadEventCreateViewModel { public int SceneID { get; set; } public int? PlotLineID { get; set; } public int? PlotThreadID { get; set; } public string? NewThreadTitle { get; set; } public int? NewThreadTypeID { get; set; } public int EventTypeID { get; set; } public string EventTitle { get; set; } = string.Empty; public string? EventDescription { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class PlotLineLaneViewModel { public PlotLineItem PlotLine { get; set; } = new(); public IReadOnlyList SceneSlots { get; set; } = []; } public sealed class PlotLaneSceneViewModel { public Scene Scene { get; set; } = new(); public IReadOnlyList Events { get; set; } = []; } public sealed class StoryAssetListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Assets { get; set; } = []; public IReadOnlyList AssetDependencyTypeOptions { get; set; } = []; public IReadOnlyList AssetStateOptions { get; set; } = []; } public sealed class StoryAssetEditViewModel { public int StoryAssetID { get; set; } public int ProjectID { get; set; } [Required, StringLength(200)] [Display(Name = "Asset name")] public string AssetName { get; set; } = string.Empty; [Display(Name = "Kind")] public int AssetKindID { get; set; } public string? Description { get; set; } [Range(1, 10)] public int Importance { get; set; } = 5; [Display(Name = "Current state")] public int? CurrentStateID { get; set; } [Display(Name = "Current location")] public int? CurrentLocationID { get; set; } [Display(Name = "Resolved")] public bool IsResolved { get; set; } [Display(Name = "Show in Quick Add Bar")] public bool ShowInQuickAddBar { get; set; } public Project? Project { get; set; } public IReadOnlyList AssetKindOptions { get; set; } = []; public IReadOnlyList AssetStateOptions { get; set; } = []; public IReadOnlyList LocationOptions { get; set; } = []; } public sealed class StoryAssetDetailViewModel { public Project Project { get; set; } = new(); public StoryAsset Asset { get; set; } = new(); public IReadOnlyList ProjectAssets { get; set; } = []; public IReadOnlyList Events { get; set; } = []; public IReadOnlyList Dependencies { get; set; } = []; public IReadOnlyList CustodyEvents { get; set; } = []; public AssetDependencyEditViewModel NewDependency { get; set; } = new(); public IReadOnlyList AssetOptions { get; set; } = []; public IReadOnlyList AssetDependencyTypeOptions { get; set; } = []; public IReadOnlyList AssetStateOptions { get; set; } = []; } public sealed class AssetEventCreateViewModel { public int SceneID { get; set; } public int? StoryAssetID { get; set; } public string? NewAssetName { get; set; } public int? NewAssetKindID { get; set; } public int AssetEventTypeID { get; set; } public int? FromStateID { get; set; } public int? ToStateID { get; set; } public string EventTitle { get; set; } = string.Empty; public string? EventDescription { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class AssetCustodyCreateViewModel { public int SceneID { get; set; } public int StoryAssetID { get; set; } public int AssetCustodyEventTypeID { get; set; } public int CustodyRoleID { get; set; } public List CustodianCharacterIds { get; set; } = []; public string CustodianNames { get; set; } = string.Empty; public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class SceneAssetLocationCreateViewModel { public int SceneAssetLocationID { get; set; } public int SceneID { get; set; } public int StoryAssetID { get; set; } public int LocationID { get; set; } public string? Description { get; set; } public bool UpdateCurrentLocation { get; set; } = true; public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class AssetDependencyEditViewModel { public int AssetDependencyID { get; set; } public int ProjectID { get; set; } public int SourceAssetID { get; set; } public int TargetAssetID { get; set; } public int AssetDependencyTypeID { get; set; } public int? SourceRequiredStateID { get; set; } public int? TargetBlockedStateID { get; set; } public string? Description { get; set; } } public sealed class AssetLaneViewModel { public StoryAsset Asset { get; set; } = new(); public IReadOnlyList SceneSlots { get; set; } = []; } public sealed class AssetLaneSceneViewModel { public Scene Scene { get; set; } = new(); public IReadOnlyList Events { get; set; } = []; } public sealed class CharacterListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Characters { get; set; } = []; } public sealed class CharacterEditViewModel { public int CharacterID { get; set; } public int ProjectID { get; set; } [Required, StringLength(200)] [Display(Name = "Character name")] public string CharacterName { get; set; } = string.Empty; [Display(Name = "Short name")] public string? ShortName { get; set; } public string? Sex { get; set; } [Display(Name = "Birth date")] public DateTime? BirthDate { get; set; } [Display(Name = "Age at series start")] public int? AgeAtSeriesStart { get; set; } public string? Height { get; set; } [Display(Name = "Eye colour")] public string? EyeColour { get; set; } [Display(Name = "Story importance")] public int? CharacterImportance { get; set; } [Display(Name = "Show in Quick Add Bar")] public bool ShowInQuickAddBar { get; set; } [Display(Name = "Default description")] public string? DefaultDescription { get; set; } public IReadOnlyList ImportanceOptions { get; set; } = [ new("Use timeline fallback", string.Empty), new("Major", "10"), new("Secondary / Supporting", "6"), new("Minor", "2") ]; public Project? Project { get; set; } } public sealed class CharacterDetailViewModel { public Project Project { get; set; } = new(); public Character Character { get; set; } = new(); public string DisplayAge { get; set; } = "Unknown"; public IReadOnlyList Appearances { get; set; } = []; public IReadOnlyList AttributeEvents { get; set; } = []; public IReadOnlyList KnowledgeItems { get; set; } = []; public IReadOnlyList Relationships { get; set; } = []; public IReadOnlyList RelationshipEvents { get; set; } = []; } public sealed class SceneCharacterCreateViewModel { public int SceneID { get; set; } public int? CharacterID { get; set; } public string? NewCharacterName { get; set; } public int? RoleInSceneTypeID { get; set; } public int? PresenceTypeID { get; set; } public int? LocationID { get; set; } public int? EntryLocationID { get; set; } public int? ExitLocationID { get; set; } public string? AppearanceNotes { get; set; } public string? OutfitDescription { get; set; } public string? PhysicalCondition { get; set; } public string? EmotionalState { get; set; } public string? KnowledgeNotes { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class SceneCharacterEditViewModel { public int SceneCharacterID { get; set; } public int SceneID { get; set; } public int CharacterID { get; set; } public int? RoleInSceneTypeID { get; set; } public int? PresenceTypeID { get; set; } public int? LocationID { get; set; } public int? EntryLocationID { get; set; } public int? ExitLocationID { get; set; } public string? AppearanceNotes { get; set; } public string? OutfitDescription { get; set; } public string? PhysicalCondition { get; set; } public string? EmotionalState { get; set; } public string? KnowledgeNotes { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class CharacterAttributeEventCreateViewModel { public int SceneID { get; set; } public int CharacterID { get; set; } public int CharacterAttributeTypeID { get; set; } public string AttributeValue { get; set; } = string.Empty; public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class CharacterKnowledgeCreateViewModel { public int SceneID { get; set; } public int CharacterID { get; set; } public int? StoryAssetID { get; set; } public int? PlotThreadID { get; set; } public int KnowledgeStateID { get; set; } public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class RelationshipEventCreateViewModel { public int SceneID { get; set; } public int? CharacterRelationshipID { get; set; } public int? CharacterAID { get; set; } public int? CharacterBID { get; set; } public int? RelationshipTypeID { get; set; } public int RelationshipStateID { get; set; } public int? Intensity { get; set; } public bool IsKnownToOtherCharacter { get; set; } public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class CharacterLaneViewModel { public Character Character { get; set; } = new(); public IReadOnlyList SceneSlots { get; set; } = []; } public sealed class CharacterLaneSceneViewModel { public Scene Scene { get; set; } = new(); public IReadOnlyList Appearances { get; set; } = []; } public sealed class LocationListViewModel { public Project Project { get; set; } = new(); public IReadOnlyList Locations { get; set; } = []; public IReadOnlyList RelationshipTypeOptions { get; set; } = []; } public sealed class LocationEditViewModel { public int LocationID { get; set; } public int ProjectID { get; set; } public int? ParentLocationID { get; set; } [Required, StringLength(200)] [Display(Name = "Location name")] public string LocationName { get; set; } = string.Empty; [Display(Name = "Location type")] public int? LocationTypeID { get; set; } public string? Description { get; set; } [Display(Name = "Show in Quick Add Bar")] public bool ShowInQuickAddBar { get; set; } public Project? Project { get; set; } public IReadOnlyList ParentLocationOptions { get; set; } = []; public IReadOnlyList LocationTypeOptions { get; set; } = []; } public sealed class LocationDetailViewModel { public Project Project { get; set; } = new(); public LocationItem Location { get; set; } = new(); public IReadOnlyList ChildLocations { get; set; } = []; public IReadOnlyList Relationships { get; set; } = []; public IReadOnlyList Scenes { get; set; } = []; public IReadOnlyList Characters { get; set; } = []; public IReadOnlyList Assets { get; set; } = []; public LocationRelationshipEditViewModel NewRelationship { get; set; } = new(); public IReadOnlyList LocationOptions { get; set; } = []; public IReadOnlyList RelationshipTypeOptions { get; set; } = []; } public sealed class LocationRelationshipEditViewModel { public int LocationRelationshipID { get; set; } public int ProjectID { get; set; } public int FromLocationID { get; set; } public int ToLocationID { get; set; } public int LocationRelationshipTypeID { get; set; } public bool IsBidirectional { get; set; } public int? Strength { get; set; } public bool CanHearNormalSpeech { get; set; } public bool CanHearLoudNoise { get; set; } public bool CanSeeMovement { get; set; } public bool CanSeeClearly { get; set; } public bool CanTravelDirectly { get; set; } public string? Notes { get; set; } } public sealed class WarningDashboardViewModel { public Project Project { get; set; } = new(); public int? BookID { get; set; } public int? SceneID { get; set; } public int? WarningTypeID { get; set; } public int? WarningSeverityID { get; set; } public string? EntityType { get; set; } public bool IncludeDismissed { get; set; } public bool IncludeIntentional { get; set; } public IReadOnlyList Warnings { get; set; } = []; public IReadOnlyList BookOptions { get; set; } = []; public IReadOnlyList WarningTypeOptions { get; set; } = []; public IReadOnlyList SeverityOptions { get; set; } = []; public IReadOnlyList EntityTypeOptions { get; set; } = []; public IReadOnlyDictionary CountsBySeverity { get; set; } = new Dictionary(); public IReadOnlyDictionary CountsByType { get; set; } = new Dictionary(); public ContinuityValidationSummary? LastValidationSummary { get; set; } } public sealed class SceneDependencyCreateViewModel { public int SceneDependencyID { get; set; } public int ProjectID { get; set; } public int CurrentSceneID { get; set; } public int RelatedSceneID { get; set; } public string Direction { get; set; } = "CurrentDependsOnRelated"; public int SceneDependencyTypeID { get; set; } public bool IsHardDependency { get; set; } public string? Description { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class SceneMoveRequestViewModel { public int SceneID { get; set; } public int TargetChapterID { get; set; } public string Position { get; set; } = "End"; public bool RenumberScenes { get; set; } public int? ReturnProjectID { get; set; } public int? ReturnBookID { get; set; } } public sealed class SceneMovePreviewViewModel { public SceneMovePreview Preview { get; set; } = new(); public SceneMoveRequestViewModel Request { get; set; } = new(); public IReadOnlyList CurrentWarnings { get; set; } = []; } public sealed class AnalyticsViewModel { public Project Project { get; set; } = new(); public int? BookID { get; set; } public decimal? StartChapterNumber { get; set; } public decimal? EndChapterNumber { get; set; } public decimal? StartSceneNumber { get; set; } public decimal? EndSceneNumber { get; set; } public IReadOnlyList BookOptions { get; set; } = []; public IReadOnlyList MetricGraphs { get; set; } = []; public IReadOnlyList RevisionSummary { get; set; } = []; public IReadOnlyList RevisionAttentionScenes { get; set; } = []; public IReadOnlyList PurposeSummary { get; set; } = []; public IReadOnlyList SceneGaps { get; set; } = []; public IReadOnlyList ThreadHealth { get; set; } = []; public IReadOnlyList AssetHealth { get; set; } = []; public IReadOnlyList WarningSeverityCounts { get; set; } = []; public IReadOnlyList WarningTypeCounts { get; set; } = []; public IReadOnlyList WarningHotspots { get; set; } = []; public IReadOnlyList PovSummary { get; set; } = []; public IReadOnlyList MultiPovChapters { get; set; } = []; public IReadOnlyList CharacterAppearances { get; set; } = []; public IReadOnlyList BusyScenes { get; set; } = []; public IReadOnlyList LocationUsage { get; set; } = []; public IReadOnlyList PacingReviewNotes { get; set; } = []; } public sealed class AnalyticsMetricGraphViewModel { public string MetricName { get; set; } = string.Empty; public IReadOnlyList Points { get; set; } = []; } public sealed class AnalyticsReviewNote { public string MetricName { get; set; } = string.Empty; public string SceneRange { get; set; } = string.Empty; public string ValuePattern { get; set; } = string.Empty; public string ReviewNote { get; set; } = string.Empty; public int? SceneID { get; set; } }