2022-02-19 16:42:47 +00:00
|
|
|
namespace QuestReader.Models;
|
2022-02-15 18:38:47 +00:00
|
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
2022-02-19 16:42:47 +00:00
|
|
|
using QuestReader.Models.ParsedContent;
|
2022-02-15 18:38:47 +00:00
|
|
|
|
|
|
|
public record ThreadPost
|
|
|
|
{
|
|
|
|
public int Id { get; set; }
|
|
|
|
public string Author { get; set; }
|
|
|
|
public string Uid { get; set; }
|
|
|
|
public string RawHtml { get; set; }
|
2022-02-20 19:27:27 +00:00
|
|
|
public RootNode? ParsedContent { get; set; }
|
2022-02-15 18:38:47 +00:00
|
|
|
public string? File { get; set; }
|
|
|
|
public string? Filename { get; set; }
|
|
|
|
public string? Title { get; set; }
|
|
|
|
public string? Tripcode { get; set; }
|
|
|
|
public DateTime Date { get; set; }
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
public bool IsChapterAnnounce { get; set; } = false;
|
2022-02-20 19:27:27 +00:00
|
|
|
[JsonIgnore]
|
2022-02-15 18:38:47 +00:00
|
|
|
public ChapterMetadata? Chapter { get; set; }
|
2022-02-20 19:27:27 +00:00
|
|
|
[JsonIgnore]
|
|
|
|
public bool AuthorPost { get; set; } = false;
|
2022-02-21 09:33:17 +00:00
|
|
|
[JsonIgnore]
|
|
|
|
public int? FileHeight { get; set; }
|
|
|
|
[JsonIgnore]
|
|
|
|
public int? FileWidth { get; set; }
|
2022-02-15 18:38:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public record Metadata
|
|
|
|
{
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string Author { get; set; }
|
|
|
|
public Uri AuthorPage { get; set; }
|
|
|
|
public string? AuthorTwitter { get; set; }
|
2022-02-16 12:38:08 +00:00
|
|
|
public string? Description { get; set; }
|
2022-02-15 18:38:47 +00:00
|
|
|
public Uri AssetsBaseUrl { get; set; }
|
|
|
|
public string SocialPreview { get; set; }
|
|
|
|
public List<int> Threads { get; set; }
|
|
|
|
public List<ChapterMetadata> Chapters { get; set; }
|
|
|
|
|
|
|
|
public override string ToString() => $"\"{Name}\" by {Author}";
|
|
|
|
}
|
|
|
|
public record ChapterMetadata
|
|
|
|
{
|
|
|
|
public int Id { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
public string Subtitle { get; set; }
|
|
|
|
public int Start { get; set; }
|
|
|
|
public int? Announce { get; set; }
|
|
|
|
public int End { get; set; }
|
|
|
|
}
|