From 510f3af48d9d7ab15efbb0180e13df2b281b4308 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Wed, 19 Jul 2023 17:51:18 +0330 Subject: [PATCH] #398 some other book related database models --- .../PDFLibrary/MultiVolumePDFCollection.cs | 23 ++++ RMuseum/Models/PDFLibrary/PDFBook.cs | 31 ++++++ RMuseum/Models/PDFLibrary/PDFPage.cs | 54 ++++++++++ RMuseum/RMuseum.xml | 100 ++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 RMuseum/Models/PDFLibrary/MultiVolumePDFCollection.cs create mode 100644 RMuseum/Models/PDFLibrary/PDFPage.cs diff --git a/RMuseum/Models/PDFLibrary/MultiVolumePDFCollection.cs b/RMuseum/Models/PDFLibrary/MultiVolumePDFCollection.cs new file mode 100644 index 00000000..61d1b23f --- /dev/null +++ b/RMuseum/Models/PDFLibrary/MultiVolumePDFCollection.cs @@ -0,0 +1,23 @@ +namespace RMuseum.Models.PDFLibrary +{ + /// + /// Multi Volume Book + /// + public class MultiVolumePDFCollection + { + /// + /// Id + /// + public int Id { get; set; } + + /// + /// Name + /// + public string Name { get; set; } + + /// + /// Description + /// + public string Description { get; set; } + } +} diff --git a/RMuseum/Models/PDFLibrary/PDFBook.cs b/RMuseum/Models/PDFLibrary/PDFBook.cs index 6c7a995d..d8c380e7 100644 --- a/RMuseum/Models/PDFLibrary/PDFBook.cs +++ b/RMuseum/Models/PDFLibrary/PDFBook.cs @@ -1,6 +1,7 @@ using RMuseum.Models.Artifact; using RSecurityBackend.Models.Image; using System; +using System.Collections.Generic; namespace RMuseum.Models.PDFLibrary { @@ -94,6 +95,21 @@ namespace RMuseum.Models.PDFLibrary /// public int? ClaimedPageCount { get; set; } + /// + /// MultiVolumePDFCollection Id + /// + public int? MultiVolumePDFCollectionId { get; set; } + + /// + /// MultiVolumePDFCollection + /// + public virtual MultiVolumePDFCollection MultiVolumePDFCollection { get; set; } + + /// + /// Volume Order + /// + public int VolumeOrder { get; set; } + /// /// Date/Time /// @@ -138,5 +154,20 @@ namespace RMuseum.Models.PDFLibrary /// original file url /// public string OriginalFileUrl { get; set; } + + /// + /// Pages + /// + public ICollection Pages { get; set; } + + /// + /// page count + /// + public int PageCount { get; set; } + + /// + /// Attributes + /// + public ICollection Tags { get; set; } } } diff --git a/RMuseum/Models/PDFLibrary/PDFPage.cs b/RMuseum/Models/PDFLibrary/PDFPage.cs new file mode 100644 index 00000000..7c37571f --- /dev/null +++ b/RMuseum/Models/PDFLibrary/PDFPage.cs @@ -0,0 +1,54 @@ +using RMuseum.Models.Artifact; +using RSecurityBackend.Models.Image; +using System; +using System.Collections.Generic; + +namespace RMuseum.Models.PDFLibrary +{ + /// + /// PDF Page + /// + public class PDFPage + { + /// + /// Id + /// + public int Id { get; set; } + + /// + /// PDF Book Id + /// + public int PDFBookId { get; set; } + + /// + /// page number + /// + public int PageNumber { get; set; } + + /// + /// Thumbnail Image + /// + public RImage Thumbnail { get; set; } + + /// + /// external thumbnail image url + /// + public string ExtenalThumbnailImageUrl { get; set; } + + /// + /// description + /// + public string Description { get; set; } + + /// + /// Last Modified + /// + public DateTime LastModified { get; set; } + + /// + /// Attributes + /// + public ICollection Tags { get; set; } + + } +} diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index cadbf598..cf7baa71 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -11598,6 +11598,11 @@ Friendly Url + + + Publish Status + + Title @@ -11678,6 +11683,101 @@ Last Modified for caching purposes + + + PDF File + + + + + external url for PDF File + + + + + Cover Image + + + + + external cover image url + + + + + original source name + + + + + original source url + + + + + original file url + + + + + Pages + + + + + page count + + + + + Attributes + + + + + PDF Page + + + + + Id + + + + + PDF Book Id + + + + + page number + + + + + Thumbnail Image + + + + + external thumbnail image url + + + + + description + + + + + Last Modified + + + + + Attributes + + Upload Session