mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14:11:10 +00:00
Scopes books to a media library and tracks their metadata enrichment status
This commit is contained in:
1 parent
386d583a2b
commit
f33817f2d2
48 files changed
+2038
-63
No files matched your search
+6
-1
@@ -1,11 +1,12 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Domain.Common.ValueObjects.Metadata;
|
||||
using Lumina.Domain.Core.BoundedContexts.MediaContributorBoundedContext.MediaContributorAggregate.ValueObjects;
|
||||
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate;
|
||||
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate.Entities;
|
||||
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.BookLibraryAggregate.ValueObjects;
|
||||
using Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext.ExternalIdentifiers.LibraryManagementBoundedContext.LibraryAggregate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -36,6 +37,8 @@ public class BookJsonConverter : JsonConverter<Book>
|
||||
JsonElement root = doc.RootElement;
|
||||
|
||||
Guid id = root.GetProperty("id").GetGuid();
|
||||
Guid libraryId = root.GetProperty("libraryId").GetGuid();
|
||||
string path = root.GetProperty("path").GetString()!;
|
||||
DateTime createdOnUtc = root.GetProperty("createdOnUtc").GetDateTime();
|
||||
WrittenContentMetadata metadata = DeserializeMetadata(root.GetProperty("metadata"));
|
||||
BookFormat? format = null;
|
||||
@@ -66,6 +69,8 @@ public class BookJsonConverter : JsonConverter<Book>
|
||||
|
||||
ErrorOr.ErrorOr<Book> createBookResult = Book.Create(
|
||||
BookId.Create(id),
|
||||
LibraryId.Create(libraryId),
|
||||
path,
|
||||
metadata,
|
||||
Optional<BookFormat>.FromNullable(format),
|
||||
Optional<string>.FromNullable(edition),
|
||||
|
||||
Reference in new issue
Block a user