namespace PlotLine.Models; public sealed class ProjectBackupExport { public string Format { get; init; } = "PlotDirector.ProjectBackup"; public string FormatVersion { get; init; } = "1.1"; public DateTime ExportedAtUtc { get; init; } public string SourceApplication { get; init; } = "PlotDirector"; public Project? Project { get; init; } public ProjectBackupData Data { get; init; } = new(); public ProjectBackupDiagnostics Diagnostics { get; init; } = new(); } public sealed class ProjectBackupData { public IReadOnlyList Books { get; init; } = []; public IReadOnlyList Chapters { get; init; } = []; public IReadOnlyList Scenes { get; init; } = []; public IReadOnlyList ScenePurposes { get; init; } = []; public IReadOnlyList SceneOutcomes { get; init; } = []; public IReadOnlyList SceneMetricTypes { get; init; } = []; public IReadOnlyList SceneMetricValues { get; init; } = []; public IReadOnlyList TimelineSettings { get; init; } = []; public IReadOnlyList TimelineMetricSettings { get; init; } = []; public IReadOnlyList TimelineViewPresets { get; init; } = []; public IReadOnlyList PlotLines { get; init; } = []; public IReadOnlyList PlotThreads { get; init; } = []; public IReadOnlyList ThreadEvents { get; init; } = []; public IReadOnlyList StoryAssets { get; init; } = []; public IReadOnlyList AssetStates { get; init; } = []; public IReadOnlyList AssetEvents { get; init; } = []; public IReadOnlyList AssetDependencies { get; init; } = []; public IReadOnlyList AssetCustodyEvents { get; init; } = []; public IReadOnlyList AssetCustodyCharacters { get; init; } = []; public IReadOnlyList Characters { get; init; } = []; public IReadOnlyList SceneCharacters { get; init; } = []; public IReadOnlyList CharacterAttributeTypes { get; init; } = []; public IReadOnlyList CharacterAttributeEvents { get; init; } = []; public IReadOnlyList CharacterKnowledge { get; init; } = []; public IReadOnlyList CharacterRelationships { get; init; } = []; public IReadOnlyList RelationshipEvents { get; init; } = []; public IReadOnlyList Locations { get; init; } = []; public IReadOnlyList LocationRelationships { get; init; } = []; public IReadOnlyList FloorPlans { get; init; } = []; public IReadOnlyList FloorPlanFloors { get; init; } = []; public IReadOnlyList FloorPlanBlocks { get; init; } = []; public IReadOnlyList FloorPlanTransitions { get; init; } = []; public IReadOnlyList SceneAssetLocations { get; init; } = []; public IReadOnlyList SceneFloorPlanOccupancy { get; init; } = []; public IReadOnlyList SceneDependencies { get; init; } = []; public IReadOnlyList ValidationRuns { get; init; } = []; public IReadOnlyList ContinuityWarnings { get; init; } = []; public IReadOnlyList SceneNotes { get; init; } = []; public IReadOnlyList SceneWorkflow { get; init; } = []; public IReadOnlyList SceneChecklistItems { get; init; } = []; public IReadOnlyList SceneAttachments { get; init; } = []; public IReadOnlyList ChapterGoals { get; init; } = []; public IReadOnlyList Scenarios { get; init; } = []; public IReadOnlyList ScenarioSceneOrder { get; init; } = []; public IReadOnlyList ScenarioValidationRuns { get; init; } = []; public IReadOnlyList ScenarioWarnings { get; init; } = []; public IReadOnlyList GenreMetricPresets { get; init; } = []; public IReadOnlyList GenreMetricPresetMetrics { get; init; } = []; public IReadOnlyList ProjectAccess { get; init; } = []; public IReadOnlyList UserFiles { get; init; } = []; } public sealed class ProjectBackupDiagnostics { public int ProjectId { get; init; } public IReadOnlyList IncludedEntitySets { get; init; } = []; public string? Note { get; init; } } public sealed class ProjectBackupResult { public string FileName { get; init; } = string.Empty; public string ContentType { get; init; } = "application/json"; public string Json { get; init; } = string.Empty; } public sealed class ProjectBackupScenePurpose { public int SceneID { get; set; } public int ScenePurposeTypeID { get; set; } public string PurposeName { get; set; } = string.Empty; public int SortOrder { get; set; } } public sealed class ProjectBackupSceneOutcome { public int SceneOutcomeID { get; set; } public int SceneID { get; set; } public string OutcomeDescription { get; set; } = string.Empty; public int? OutcomeTypeID { get; set; } public DateTime CreatedDate { get; set; } public DateTime UpdatedDate { get; set; } } public sealed class ProjectBackupAssetCustodyCharacter { public int AssetCustodyEventCharacterID { get; set; } public int AssetCustodyEventID { get; set; } public int? CharacterID { get; set; } public string? CharacterName { get; set; } public string? CharacterNameText { get; set; } public int CustodyRoleID { get; set; } public string CustodyRoleName { get; set; } = string.Empty; } public sealed class ProjectBackupValidationRun { public int ValidationRunID { get; set; } public int ProjectID { get; set; } public int? BookID { get; set; } public DateTime StartedDate { get; set; } public DateTime? CompletedDate { get; set; } public string? TriggeredBy { get; set; } public string? ScopeDescription { get; set; } } public sealed class ProjectBackupScenarioSceneOrder { public int ScenarioSceneOrderID { get; set; } public int ScenarioID { get; set; } public int SceneID { get; set; } public int? ProposedChapterID { get; set; } public int ProposedSortOrder { get; set; } public string? Notes { get; set; } public DateTime CreatedDate { get; set; } public DateTime UpdatedDate { get; set; } } public sealed class ProjectBackupScenarioValidationRun { public int ScenarioValidationRunID { get; set; } public int ScenarioID { get; set; } public DateTime StartedDate { get; set; } public DateTime? CompletedDate { get; set; } public int WarningCount { get; set; } } public sealed class ProjectBackupGenreMetricPresetMetric { public int GenreMetricPresetID { get; set; } public string PresetKey { get; set; } = string.Empty; public string PresetName { get; set; } = string.Empty; public int MetricTypeID { get; set; } public string MetricName { get; set; } = string.Empty; public int SortOrder { get; set; } } public sealed class ProjectBackupAccessRecord { public int ProjectUserAccessID { get; set; } public int ProjectID { get; set; } public int UserID { get; set; } public string Email { get; set; } = string.Empty; public string DisplayName { get; set; } = string.Empty; public string AccessRole { get; set; } = string.Empty; public int? InvitedByUserID { get; set; } public string? InvitedByEmail { get; set; } public DateTime? InvitedDateUTC { get; set; } public DateTime? AcceptedDateUTC { get; set; } public bool IsActive { get; set; } }