mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Moves repository entities to Application layer for joint access
This commit is contained in:
1 parent
baf9854355
commit
7321fb89e2
120 files changed
+2606
-784
No files matched your search
+3
-3
@@ -2,13 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get genre information.
|
||||
/// Data transfer object for a genre.
|
||||
/// </summary>
|
||||
/// <param name="Name">Gets the name of the genre.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record GenreEntity(
|
||||
public record GenreDto(
|
||||
string? Name
|
||||
);
|
||||
+3
-3
@@ -2,16 +2,16 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get language information.
|
||||
/// Data transfer object for language information.
|
||||
/// </summary>
|
||||
/// <param name="LanguageCode">Gets the ISO code of the language (e.g., "en" for English).</param>
|
||||
/// <param name="LanguageName">Gets the name of the language in English.</param>
|
||||
/// <param name="NativeName">Gets the native name of the language (e.g., "Español" for Spanish).</param>
|
||||
[DebuggerDisplay("LanguageName: {LanguageName}")]
|
||||
public record LanguageInfoEntity(
|
||||
public record LanguageInfoDto(
|
||||
string? LanguageCode,
|
||||
string? LanguageName,
|
||||
string? NativeName
|
||||
+3
-3
@@ -2,16 +2,16 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a rating.
|
||||
/// Data transfer object for a rating.
|
||||
/// </summary>
|
||||
/// <param name="Value">Gets the rating value.</param>
|
||||
/// <param name="MaxValue">Gets the maximum possible rating value.</param>
|
||||
/// <param name="VoteCount">Gets the number of votes that contributed to the rating.</param>
|
||||
[DebuggerDisplay("{Value}/{MaxValue}")]
|
||||
public abstract record RatingEntity(
|
||||
public abstract record RatingDto(
|
||||
decimal? Value,
|
||||
decimal? MaxValue,
|
||||
int? VoteCount
|
||||
+3
-3
@@ -3,10 +3,10 @@ using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get release information.
|
||||
/// Data transfer object for a release information.
|
||||
/// </summary>
|
||||
/// <param name="OriginalReleaseDate">Gets the original release date of the content.</param>
|
||||
/// <param name="OriginalReleaseYear">Gets the original release year of the content.</param>
|
||||
@@ -15,7 +15,7 @@ namespace Lumina.Contracts.Entities.Common;
|
||||
/// <param name="ReleaseCountry">Gets the country where the content was released.</param>
|
||||
/// <param name="ReleaseVersion">Gets the version or edition of the content's release.</param>
|
||||
[DebuggerDisplay("OriginalReleaseDate: {OriginalReleaseDate}")]
|
||||
public record ReleaseInfoEntity(
|
||||
public record ReleaseInfoDto(
|
||||
DateOnly? OriginalReleaseDate,
|
||||
int? OriginalReleaseYear,
|
||||
DateOnly? ReReleaseDate,
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
namespace Lumina.Contracts.DTO.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to get tag information.
|
||||
/// Data transfer object for a tag.
|
||||
/// </summary>
|
||||
/// <param name="Name">Gets the name of the tag.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record TagEntity(
|
||||
public record TagDto(
|
||||
string? Name
|
||||
);
|
||||
+2
-2
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.FileSystemManagement;
|
||||
namespace Lumina.Contracts.DTO.FileSystemManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Generic filesystem data transfer object.
|
||||
@@ -13,7 +13,7 @@ namespace Lumina.Contracts.Entities.FileSystemManagement;
|
||||
/// <param name="DateCreated">The creation date of the file system item.</param>
|
||||
/// <param name="DateModified">The modification date of the file system item.</param>
|
||||
[DebuggerDisplay("Name: {Name}")]
|
||||
public record FileSystemItemEntity(
|
||||
public record FileSystemItemDto(
|
||||
string Path,
|
||||
string Name,
|
||||
DateTime DateCreated,
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor.
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
/// <param name="Name">The name details of the media contributor, including display and legal names.</param>
|
||||
/// <param name="Role">The role details of the media contributor, including the role name and category.</param>
|
||||
[DebuggerDisplay("Name: {Name}, Role: {Role}")]
|
||||
public record MediaContributorEntity(
|
||||
MediaContributorNameEntity? Name,
|
||||
MediaContributorRoleEntity? Role
|
||||
public record MediaContributorDto(
|
||||
MediaContributorNameDto? Name,
|
||||
MediaContributorRoleDto? Role
|
||||
);
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor name.
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
/// <param name="DisplayName">The display name of the media contributor.</param>
|
||||
/// <param name="LegalName">The legal name of the media contributor.</param>
|
||||
[DebuggerDisplay("DisplayName: {DisplayName}")]
|
||||
public record MediaContributorNameEntity(
|
||||
public record MediaContributorNameDto(
|
||||
string? DisplayName,
|
||||
string? LegalName
|
||||
);
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
namespace Lumina.Contracts.DTO.MediaContributors;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media contributor role.
|
||||
@@ -10,7 +10,7 @@ namespace Lumina.Contracts.Entities.MediaContributors;
|
||||
/// <param name="Name">The name of the role assigned to the media contributor.</param>
|
||||
/// <param name="Category">The category of the role.</param>
|
||||
[DebuggerDisplay("Name: {Name}, Category: {Category}")]
|
||||
public record MediaContributorRoleEntity(
|
||||
public record MediaContributorRoleDto(
|
||||
string? Name,
|
||||
string? Category
|
||||
);
|
||||
+2
-2
@@ -2,13 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.Management;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media library content location.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Path: {Path}")]
|
||||
public class LibraryContentLocationEntity
|
||||
public class LibraryContentLocationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the path of the media library content location.
|
||||
+5
-5
@@ -1,22 +1,22 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.Common;
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a book rating.
|
||||
/// Data transfer object for book rating.
|
||||
/// </summary>
|
||||
/// <param name="Value">The rating value for the book.</param>
|
||||
/// <param name="MaxValue">The maximum possible rating value for the book.</param>
|
||||
/// <param name="Source">The source of the book rating (e.g., a specific website or platform).</param>
|
||||
/// <param name="VoteCount">The number of votes that contributed to the book rating.</param>
|
||||
[DebuggerDisplay("{Value}/{MaxValue}")]
|
||||
public record BookRatingEntity(
|
||||
public record BookRatingDto(
|
||||
decimal? Value,
|
||||
decimal? MaxValue,
|
||||
BookRatingSource? Source,
|
||||
int? VoteCount
|
||||
) : RatingEntity(Value, MaxValue, VoteCount);
|
||||
) : RatingDto(Value, MaxValue, VoteCount);
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for book series.
|
||||
/// Data transfer object for book series.
|
||||
/// </summary>
|
||||
/// <param name="Title">The title of the book series.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record BookSeriesEntity(
|
||||
public record BookSeriesDto(
|
||||
string? Title
|
||||
);
|
||||
+3
-3
@@ -3,7 +3,7 @@ using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for ISBN information.
|
||||
@@ -11,7 +11,7 @@ namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibra
|
||||
/// <param name="Value">The ISBN value.</param>
|
||||
/// <param name="Format">The format of the ISBN (e.g., ISBN-10 or ISBN-13).</param>
|
||||
[DebuggerDisplay("ISBN: {Value} ({Format})")]
|
||||
public record IsbnEntity(
|
||||
public record IsbnDto(
|
||||
string? Value,
|
||||
IsbnFormat? Format // TODO: perhaps it should be string, for consistency (see Format property on BookEntity) (check HaveConversion<string>())
|
||||
IsbnFormat? Format
|
||||
);
|
||||
+9
-9
@@ -1,13 +1,13 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.Common;
|
||||
using Lumina.Contracts.DTO.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary;
|
||||
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for written content metadata.
|
||||
/// Data transfer object for written content metadata.
|
||||
/// </summary>
|
||||
/// <param name="Title">The title of the written content.</param>
|
||||
/// <param name="OriginalTitle">The original title of the written content, if different from the current title.</param>
|
||||
@@ -20,15 +20,15 @@ namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary;
|
||||
/// <param name="Publisher">The name of the publisher of the written content.</param>
|
||||
/// <param name="PageCount">The number of pages in the written content.</param>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public record WrittenContentMetadataEntity(
|
||||
public record WrittenContentMetadataDto(
|
||||
string? Title,
|
||||
string? OriginalTitle,
|
||||
string? Description,
|
||||
ReleaseInfoEntity? ReleaseInfo,
|
||||
List<GenreEntity>? Genres,
|
||||
List<TagEntity>? Tags,
|
||||
LanguageInfoEntity? Language,
|
||||
LanguageInfoEntity? OriginalLanguage,
|
||||
ReleaseInfoDto? ReleaseInfo,
|
||||
List<GenreDto>? Genres,
|
||||
List<TagDto>? Tags,
|
||||
LanguageInfoDto? Language,
|
||||
LanguageInfoDto? OriginalLanguage,
|
||||
string? Publisher,
|
||||
int? PageCount
|
||||
);
|
||||
@@ -1,26 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for storage models, enforces Id.
|
||||
/// </summary>
|
||||
public interface IStorageEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the entity.
|
||||
/// </summary>
|
||||
Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional time and date when the entity was updated.
|
||||
/// </summary>
|
||||
DateTime? Updated { get; set; }
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.Common;
|
||||
using Lumina.Contracts.Entities.UsersManagement;
|
||||
using Lumina.Domain.Common.Enums.MediaLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a media library.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class LibraryEntity : IStorageEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media library.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Id of the user that owns the media library.
|
||||
/// </summary>
|
||||
public required Guid UserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the media library.
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the media library.
|
||||
/// </summary>
|
||||
public required LibraryType LibraryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of file system paths that make up the media library.
|
||||
/// </summary>
|
||||
public required ICollection<LibraryContentLocationEntity> ContentLocations { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user that owns the media library.
|
||||
/// </summary>
|
||||
public UserEntity User { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
public required DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional time and date when the entity was updated.
|
||||
/// </summary>
|
||||
public DateTime? Updated { get; set; }
|
||||
}
|
||||
-207
@@ -1,207 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.Common;
|
||||
using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a book.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class BookEntity : IStorageEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media item.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the media item.
|
||||
/// </summary>
|
||||
public required string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the original title of the media item.
|
||||
/// </summary>
|
||||
public string? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional description of the media item.
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional original release date of the media item.
|
||||
/// </summary>
|
||||
public DateOnly? OriginalReleaseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional original release year of the media item.
|
||||
/// This is useful when only the year of original release is known.
|
||||
/// </summary>
|
||||
public int? OriginalReleaseYear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional re-release or reissue date of the media item.
|
||||
/// </summary>
|
||||
public DateOnly? ReReleaseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional re-release or reissue year of the media item.
|
||||
/// </summary>
|
||||
public int? ReReleaseYear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional country or region of release.
|
||||
/// </summary>
|
||||
public string? ReleaseCountry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0")
|
||||
/// </summary>
|
||||
public string? ReleaseVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ISO 639-1 two-letter language code.
|
||||
/// </summary>
|
||||
public string? LanguageCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the full name of the language in English.
|
||||
/// </summary>
|
||||
public string? LanguageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional native name of the language.
|
||||
/// </summary>
|
||||
public string? LanguageNativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional ISO 639-1 two-letter original language code.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional full name of the original language in English.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional native name of the original language.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageNativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of tags associated with the media item.
|
||||
/// </summary>
|
||||
public HashSet<TagEntity> Tags { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of genres associated with the media item.
|
||||
/// </summary>
|
||||
public HashSet<GenreEntity> Genres { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the publisher of the written content.
|
||||
/// </summary>
|
||||
public string? Publisher { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of pages in the written content.
|
||||
/// </summary>
|
||||
public int? PageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format of the book (e.g., Hardcover, Paperback), if applicable.
|
||||
/// </summary>
|
||||
public BookFormat? Format { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the edition of the book, if applicable.
|
||||
/// </summary>
|
||||
public string? Edition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the volume or book number in the series, if applicable.
|
||||
/// </summary>
|
||||
public int? VolumeNumber { get; set; }
|
||||
// TODO: uncomment when series is implemented
|
||||
/// <summary>
|
||||
/// Gets or sets the series id, if the book is part of a series.
|
||||
/// </summary>
|
||||
//public Guid? BookSeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ASIN (Amazon Standard Identification Number) of the book.
|
||||
/// </summary>
|
||||
public string? ASIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Goodreads ID of the book.
|
||||
/// </summary>
|
||||
public string? GoodreadsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Library of Congress Control Number (LCCN) of the book.
|
||||
/// </summary>
|
||||
public string? LCCN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the OCLC Number (WorldCat identifier) of the book.
|
||||
/// </summary>
|
||||
public string? OCLCNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Open Library ID of the book.
|
||||
/// </summary>
|
||||
public string? OpenLibraryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LibraryThing ID of the book.
|
||||
/// </summary>
|
||||
public string? LibraryThingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Google Books ID of the book.
|
||||
/// </summary>
|
||||
public string? GoogleBooksId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Barnes & Noble ID of the book.
|
||||
/// </summary>
|
||||
public string? BarnesAndNobleId { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Apple Books ID of the book.
|
||||
/// </summary>
|
||||
public string? AppleBooksId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of ISBN (International Standard Book Number) of the book.
|
||||
/// </summary>
|
||||
public List<IsbnEntity> ISBNs { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of media contributors (actors, directors, etc) starring in this book.
|
||||
/// </summary>
|
||||
//public List<ContributorIdModel> ContributorIds { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of ratings for this book.
|
||||
/// </summary>
|
||||
public List<BookRatingEntity> Ratings { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
public required DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional time and date when the entity was updated.
|
||||
/// </summary>
|
||||
public DateTime? Updated { get; set; }
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.Common;
|
||||
using Lumina.Contracts.Entities.MediaLibrary.Management;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Entities.UsersManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for a user.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Username: {Username}")]
|
||||
public class UserEntity : IStorageEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the user.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the username of the user.
|
||||
/// </summary>
|
||||
public required string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the hashed password of the user.
|
||||
/// </summary>
|
||||
public required string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional Time-based One-Time Password (TOTP) secret for two-factor authentication.
|
||||
/// </summary>
|
||||
public string? TotpSecret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional token used for account verification or password reset.
|
||||
/// </summary>
|
||||
public string? VerificationToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional date and time when the verification token was created.
|
||||
/// </summary>
|
||||
public DateTime? VerificationTokenCreated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection of libraries owned by this user.
|
||||
/// </summary>
|
||||
public required ICollection<LibraryEntity> Libraries { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
public required DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional time and date when the entity was updated.
|
||||
/// </summary>
|
||||
public DateTime? Updated { get; set; }
|
||||
}
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.MediaContributors;
|
||||
using Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary;
|
||||
using Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Contracts.DTO.MediaContributors;
|
||||
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
|
||||
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -31,11 +31,11 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra
|
||||
/// <param name="Ratings">The list of ratings for this book.</param>
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record AddBookRequest(
|
||||
WrittenContentMetadataEntity? Metadata,
|
||||
WrittenContentMetadataDto? Metadata,
|
||||
BookFormat? Format,
|
||||
string? Edition,
|
||||
int? VolumeNumber,
|
||||
BookSeriesEntity? Series,
|
||||
BookSeriesDto? Series,
|
||||
string? ASIN,
|
||||
string? GoodreadsId,
|
||||
string? LCCN,
|
||||
@@ -45,7 +45,7 @@ public record AddBookRequest(
|
||||
string? GoogleBooksId,
|
||||
string? BarnesAndNobleId,
|
||||
string? AppleBooksId,
|
||||
List<IsbnEntity>? ISBNs,
|
||||
List<MediaContributorEntity>? Contributors,
|
||||
List<BookRatingEntity>? Ratings
|
||||
List<IsbnDto>? ISBNs,
|
||||
List<MediaContributorDto>? Contributors,
|
||||
List<BookRatingDto>? Ratings
|
||||
);
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.FileSystemManagement;
|
||||
using Lumina.Contracts.DTO.FileSystemManagement;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -21,5 +21,5 @@ public record DirectoryResponse(
|
||||
string Name,
|
||||
DateTime DateCreated,
|
||||
DateTime DateModified,
|
||||
List<FileSystemItemEntity> Items
|
||||
) : FileSystemItemEntity(Path, Name, DateCreated, DateModified);
|
||||
List<FileSystemItemDto> Items
|
||||
) : FileSystemItemDto(Path, Name, DateCreated, DateModified);
|
||||
@@ -1,5 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.FileSystemManagement;
|
||||
using Lumina.Contracts.DTO.FileSystemManagement;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
@@ -21,4 +21,4 @@ public record FileResponse(
|
||||
DateTime DateCreated,
|
||||
DateTime DateModified,
|
||||
long Size
|
||||
) : FileSystemItemEntity(Path, Name, DateCreated, DateModified);
|
||||
) : FileSystemItemDto(Path, Name, DateCreated, DateModified);
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.MediaContributors;
|
||||
using Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary;
|
||||
using Lumina.Contracts.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Contracts.DTO.MediaContributors;
|
||||
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
|
||||
using Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Domain.Common.Enums.BookLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -36,11 +36,11 @@ namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibr
|
||||
[DebuggerDisplay("Title: {Metadata.Title}")]
|
||||
public record BookResponse(
|
||||
Guid Id,
|
||||
WrittenContentMetadataEntity Metadata,
|
||||
WrittenContentMetadataDto Metadata,
|
||||
BookFormat? Format,
|
||||
string? Edition,
|
||||
int? VolumeNumber,
|
||||
BookSeriesEntity? Series,
|
||||
BookSeriesDto? Series,
|
||||
string? ASIN,
|
||||
string? GoodreadsId,
|
||||
string? LCCN,
|
||||
@@ -50,9 +50,9 @@ public record BookResponse(
|
||||
string? GoogleBooksId,
|
||||
string? BarnesAndNobleId,
|
||||
string? AppleBooksId,
|
||||
List<IsbnEntity>? ISBNs,
|
||||
List<MediaContributorEntity>? Contributors,
|
||||
List<BookRatingEntity>? Ratings,
|
||||
List<IsbnDto>? ISBNs,
|
||||
List<MediaContributorDto>? Contributors,
|
||||
List<BookRatingDto>? Ratings,
|
||||
DateTime Created,
|
||||
DateTime? Updated
|
||||
);
|
||||
Reference in new issue
Block a user