mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16:11:10 +00:00
Improves the plugin system documentation, tests and conventions
- Documents the book metadata DTOs and the Book aggregate constructor parameters - References ADR-0006 in the scan snapshot repository remarks, explaining the Dapper choice - Extracts shared plugin entity fixtures and uses them in the plugin and metadata provider tests - Moves PluginLoadResult to the Common DTO models, renaming it PluginLoadResultDto - Replaces the duplicate Contracts plugin setting type with the shared kernel enum - Removes the generated plugin view Designer file and its project wiring - Drops redundant braces in the plugin repositories
This commit is contained in:
1 parent
42566dcf06
commit
3653ff5bd7
25 files changed
+168
-321
No files matched your search
+27
@@ -10,6 +10,33 @@ namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
/// <summary>
|
||||
/// Data transfer object for the metadata of a book returned by a metadata provider.
|
||||
/// </summary>
|
||||
/// <param name="Title">The title of the book.</param>
|
||||
/// <param name="OriginalTitle">The original title of the book, if different from the current title.</param>
|
||||
/// <param name="Description">A brief description or summary of the book.</param>
|
||||
/// <param name="ReleaseInfo">The release information, including release date and other relevant details.</param>
|
||||
/// <param name="Genres">The list of genres associated with the book.</param>
|
||||
/// <param name="Tags">The list of tags that further describe or categorize the book.</param>
|
||||
/// <param name="Language">The language in which the book is written.</param>
|
||||
/// <param name="OriginalLanguage">The original language of the book, if it has been translated.</param>
|
||||
/// <param name="Publisher">The name of the publisher of the book.</param>
|
||||
/// <param name="PageCount">The number of pages in the book.</param>
|
||||
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback), if applicable.</param>
|
||||
/// <param name="Edition">The edition of the book, if applicable.</param>
|
||||
/// <param name="VolumeNumber">The volume or book number in the series, if applicable.</param>
|
||||
/// <param name="Series">The series name, if the book is part of a series.</param>
|
||||
/// <param name="ASIN">The ASIN (Amazon Standard Identification Number) of the book, if applicable.</param>
|
||||
/// <param name="GoodreadsId">The Goodreads ID of the book, if applicable.</param>
|
||||
/// <param name="LCCN">The Library of Congress Control Number (LCCN) of the book, if applicable.</param>
|
||||
/// <param name="OCLCNumber">The OCLC Number (WorldCat identifier) of the book, if applicable.</param>
|
||||
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
|
||||
/// <param name="LibraryThingId">The LibraryThing ID of the book, if applicable.</param>
|
||||
/// <param name="GoogleBooksId">The Google Books ID of the book, if applicable.</param>
|
||||
/// <param name="BarnesAndNobleId">The Barnes & Noble ID of the book, if applicable.</param>
|
||||
/// <param name="AppleBooksId">The Apple Books ID of the book, if applicable.</param>
|
||||
/// <param name="Isbns">The list of ISBN (International Standard Book Number) of the book.</param>
|
||||
/// <param name="Contributors">The list of media contributors of the book.</param>
|
||||
/// <param name="Ratings">The list of ratings for the book.</param>
|
||||
/// <param name="CoverImageUrl">The URL of the cover image of the book, if applicable.</param>
|
||||
public sealed record BookMetadataDto(
|
||||
string? Title,
|
||||
string? OriginalTitle,
|
||||
|
||||
+7
-9
@@ -1,7 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
@@ -9,6 +8,13 @@ namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
/// <summary>
|
||||
/// Data transfer object for a book metadata lookup.
|
||||
/// </summary>
|
||||
/// <param name="LibraryId">The Id of the media library the book belongs to.</param>
|
||||
/// <param name="Path">The file system path of the book.</param>
|
||||
/// <param name="Isbn">The ISBN (International Standard Book Number) of the book, if applicable.</param>
|
||||
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
|
||||
/// <param name="Title">The title of the book, if applicable.</param>
|
||||
/// <param name="Author">The author of the book, if applicable.</param>
|
||||
/// <param name="LanguageCode">The language code of the book, if applicable.</param>
|
||||
public sealed record BookMetadataLookupDto(
|
||||
Guid LibraryId,
|
||||
string Path,
|
||||
@@ -17,12 +23,4 @@ public sealed record BookMetadataLookupDto(
|
||||
string? Title = null,
|
||||
string? Author = null,
|
||||
string? LanguageCode = null
|
||||
//string? Title,
|
||||
//string? OriginalTitle,
|
||||
//int? ReleaseYear,
|
||||
//string? LanguageCode,
|
||||
//IReadOnlyList<string>? Isbns,
|
||||
//string? GoodreadsId,
|
||||
//string? OpenLibraryId,
|
||||
//string? GoogleBooksId
|
||||
) : MetadataLookupDto;
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Contracts.Requests.Plugins;
|
||||
/// </summary>
|
||||
/// <param name="LibraryId">The Id of the media library whose metadata provider is enabled or disabled. Required.</param>
|
||||
/// <param name="PluginId">The unique identifier of the plugin providing the metadata. Required.</param>
|
||||
/// <param name="IsEnabled">Whether the metadata provider should be enabled for the media library.</param>
|
||||
/// <param name="IsEnabled">Whether the metadata provider should be enabled for the media library. Required.</param>
|
||||
[DebuggerDisplay("LibraryId: {LibraryId}, PluginId: {PluginId}")]
|
||||
public sealed record SetLibraryMetadataProviderEnabledRequest(
|
||||
Guid LibraryId,
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Contracts.Requests.Plugins;
|
||||
/// Represents a request to update the settings of a plugin.
|
||||
/// </summary>
|
||||
/// <param name="PluginId">The unique identifier of the plugin. Required.</param>
|
||||
/// <param name="Settings">The settings of the plugin.</param>
|
||||
/// <param name="Settings">The settings of the plugin. Required.</param>
|
||||
[DebuggerDisplay("PluginId: {PluginId}")]
|
||||
public sealed record UpdatePluginSettingsRequest(
|
||||
Guid PluginId,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Plugins;
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace Lumina.Contracts.Responses.Plugins;
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration for the types of a plugin setting.
|
||||
/// </summary>
|
||||
public enum PluginSettingType
|
||||
{
|
||||
/// <summary>
|
||||
/// A free-form single line text value.
|
||||
/// </summary>
|
||||
Text,
|
||||
|
||||
/// <summary>
|
||||
/// A numeric value.
|
||||
/// </summary>
|
||||
Number,
|
||||
|
||||
/// <summary>
|
||||
/// A boolean (true/false) value.
|
||||
/// </summary>
|
||||
Boolean,
|
||||
|
||||
/// <summary>
|
||||
/// A value selected from a list of allowed values.
|
||||
/// </summary>
|
||||
Select
|
||||
}
|
||||
Reference in new issue
Block a user