41 lines
2.5 KiB
C#
41 lines
2.5 KiB
C#
namespace PlotLine.Models;
|
|
|
|
public sealed class BookBackupPackage
|
|
{
|
|
public string Format { get; set; } = "PlotDirector.BookBackup"; public string FormatVersion { get; set; } = "2.0";
|
|
public Guid SourceProjectKey { get; set; }
|
|
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
|
|
public ProjectBackupExport Snapshot { get; set; } = new();
|
|
public Dictionary<string, string> Identities { get; set; } = []; public string[] Warnings { get; set; } = []; public string Integrity { get; set; } = "";
|
|
}
|
|
public sealed record BookRecoveryPlan(Guid Upload, int[] Books, int Destination, string Name, string DestinationHash, Guid Operation, DateTime Expires);
|
|
public sealed class BookRecoveryReceipt { public bool AlreadyCompleted { get; set; } public int ProjectID { get; set; } public int BooksCreated { get; set; } public string RequestHash { get; set; } = ""; }
|
|
public sealed class BookRecoveryMapping { public string PortableKey { get; set; } = ""; public string Collection { get; set; } = ""; public int DestinationID { get; set; } public string SourceHash { get; set; } = ""; public string DestinationHash { get; set; } = ""; }
|
|
public sealed class ProjectRecoveryState
|
|
{
|
|
public List<PortableExternalReference> ExternalReferences { get; set; } = [];
|
|
public List<PortableNativeReview> NativeReviews { get; set; } = []; public List<PortableIntentAssessment> IntentAssessments { get; set; } = [];
|
|
}
|
|
public sealed class PortableNativeReview
|
|
{
|
|
public Guid ReviewID { get; set; }
|
|
public int UserID { get; set; }
|
|
public int BookID { get; set; }
|
|
public Guid ManuscriptID { get; set; }
|
|
public int ChapterStart { get; set; }
|
|
public int ChapterEnd { get; set; }
|
|
public string ContentHash { get; set; } = ""; public string ResultJson { get; set; } = ""; public string? DecisionsJson { get; set; }
|
|
public int Version { get; set; }
|
|
public DateTime CreatedUtc { get; set; }
|
|
public string? SourceJson { get; set; }
|
|
[System.Text.Json.Serialization.JsonIgnore] public string? EncryptedSource { get; set; }
|
|
}
|
|
public sealed class PortableIntentAssessment
|
|
{
|
|
public int UserID { get; set; }
|
|
public int SceneID { get; set; }
|
|
public string InputHash { get; set; } = ""; public string ResultsJson { get; set; } = "[]"; public string DecisionsJson { get; set; } = "{}"; public string Model { get; set; } = ""; public DateTime CreatedUtc { get; set; }
|
|
}
|
|
|
|
public sealed record PortableExternalReference(string Collection, int OwnerID, string Field, string TargetKey, bool BindingRequired = false);
|