87 lines
4.3 KiB
C#
87 lines
4.3 KiB
C#
using PlotDirector.Companion.Protocol.Manuscript;
|
|
namespace PlotLine.Models;
|
|
public sealed class ParagraphManuscript
|
|
{
|
|
public int Version {get;set;}=1;
|
|
public int BookId {get;set;}
|
|
public int ProjectId {get;set;}
|
|
public string DocumentName {get;set;}="";
|
|
public Guid ManuscriptId {get;set;}
|
|
public long Revision {get;set;}
|
|
public Guid LastRequestId {get;set;}
|
|
public Guid SessionId {get;set;}
|
|
public long WordRevision {get;set;}
|
|
public string SnapshotHash {get;set;}="";
|
|
public string Mode {get;set;}="Manual";
|
|
public DateTime UpdatedUtc {get;set;}
|
|
public List<PlotLine.Services.Manuscript.ChapterCheckpoint> ChapterCheckpoints {get;set;}=[];
|
|
public List<StoryParagraph> Paragraphs {get;set;}=[];
|
|
public List<ParagraphChapter> Chapters {get;set;}=[];
|
|
public List<ParagraphScene> Scenes {get;set;}=[];
|
|
public List<StoryEvidence> Evidence {get;set;}=[];
|
|
public List<ManuscriptEventOption> EventPositions {get;set;}=[];
|
|
public List<ParagraphLayout> Undo {get;set;}=[];
|
|
}
|
|
public sealed class StoryParagraph
|
|
{
|
|
public ParagraphOccurrence Occurrence {get;set;}=new();
|
|
public int? ChapterId {get;set;}
|
|
public Guid? SceneId {get;set;}
|
|
public bool Story {get;set;}
|
|
public bool PositionVerified {get;set;}
|
|
}
|
|
public sealed class ParagraphScene
|
|
{
|
|
public Guid Id {get;set;}=Guid.NewGuid();
|
|
public int CanonicalId {get;set;}
|
|
public int ChapterId {get;set;}
|
|
public string Title {get;set;}="";
|
|
public bool Retired {get;set;}
|
|
public Guid? MergedInto {get;set;}
|
|
public bool NeedsRefinement {get;set;}
|
|
}
|
|
public sealed class StoryEvidence
|
|
{
|
|
public Guid Id {get;set;}=Guid.NewGuid();
|
|
public string EventKind {get;set;}="";
|
|
public int EventId {get;set;}
|
|
public bool Primary {get;set;}
|
|
public Guid StartParagraph {get;set;}
|
|
public Guid EndParagraph {get;set;}
|
|
public int? StartOffset {get;set;}
|
|
public int? EndOffset {get;set;}
|
|
public string OriginalText {get;set;}="";
|
|
public string ConfirmedText {get;set;}="";
|
|
public string CurrentText {get;set;}="";
|
|
public string OriginalPosition {get;set;}="";
|
|
public string PreviousPosition {get;set;}="";
|
|
public string CurrentPosition {get;set;}="";
|
|
public Guid? PreviousScene {get;set;}
|
|
public Guid? CurrentScene {get;set;}
|
|
public string State {get;set;}="Verified";
|
|
public int? DerivedSceneId {get;set;}
|
|
}
|
|
public sealed class ParagraphLayout
|
|
{
|
|
public List<ParagraphChapter> Chapters {get;set;}=[];
|
|
public string SnapshotHash {get;set;}="";
|
|
public List<ParagraphScene> Scenes {get;set;}=[];
|
|
public List<ParagraphAssignment> Assignments {get;set;}=[];
|
|
public List<ManuscriptEventOption> EventPositions {get;set;}=[];
|
|
}
|
|
public sealed class ParagraphAssignment {public Guid ParagraphId {get;set;}public int? ChapterId {get;set;}public Guid? SceneId {get;set;}public bool PositionVerified {get;set;}}
|
|
public sealed class ManuscriptEventOption {public string Kind {get;set;}="";public int Id {get;set;}public int SceneId {get;set;}public string Description {get;set;}="";}
|
|
public sealed class ParagraphBootstrapScene {public int SceneId {get;set;}public int ChapterId {get;set;}public string Title {get;set;}="";public int Start {get;set;}public int End {get;set;}public bool NeedsRefinement {get;set;}}
|
|
public sealed class ParagraphWorkspaceModel
|
|
{
|
|
public const int ParagraphPageSize=100;
|
|
public int BookID=>State.BookId;public int ProjectID=>State.ProjectId;
|
|
public ParagraphManuscript State {get;set;}=new();public string BookTitle {get;set;}="";public IReadOnlyList<ManuscriptEventOption> Events {get;set;}=[];public int Page {get;set;}=1;public int EvidencePage {get;set;}=1;public string? Message {get;set;}
|
|
}
|
|
|
|
public sealed class ParagraphSyncStatus {public string SnapshotHash {get;set;}="";public int BookId {get;set;}public Guid ManuscriptId {get;set;}public long Revision {get;set;}public string Mode {get;set;}="Manual";public Guid SessionId {get;set;}public long WordRevision {get;set;}public bool CanWrite {get;set;}public bool Paused {get;set;}}
|
|
|
|
public sealed class ParagraphChapter {public int CanonicalId {get;set;}public Guid HeadingId {get;set;}public string Title {get;set;}="";}
|
|
|
|
public sealed class ParagraphPosition { public bool HasSnapshot {get;set;} public long Revision {get;set;} public int? ChapterID {get;set;} public int? SceneID {get;set;} }
|