mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Refactors the add book slice and shared media contributor model across the stack
This commit is contained in:
1 parent
3a2c80b615
commit
9a71a6d32b
61 files changed
+5223
-1384
No files matched your search
+10
-16
@@ -5,12 +5,11 @@ using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DataAccess.Entities.MediaContributors;
|
||||
namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Repository entity for the participation of a media contributor in a book, carrying the role the contributor
|
||||
/// played in that book. The role is tracked per participation, so that a single contributor can play multiple
|
||||
/// roles in the same book, or different roles in different books.
|
||||
/// Repository entity for the participation of a media contributor in a book, carrying the role the contributor played in that book.
|
||||
/// The role is tracked per participation, so that a single contributor can play multiple roles in the same book, or different roles in different books.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("BookId: {BookId} MediaContributorId: {MediaContributorId}")]
|
||||
public class BookContributorEntity : IStorageEntity, IAuditableEntity
|
||||
@@ -21,24 +20,19 @@ public class BookContributorEntity : IStorageEntity, IAuditableEntity
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Id of the book the contributor participated in.
|
||||
/// Gets the Id of the book the contributor participated in.
|
||||
/// </summary>
|
||||
public required Guid BookId { get; set; }
|
||||
public required Guid BookId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Id of the media contributor.
|
||||
/// Gets the Id of the media contributor.
|
||||
/// </summary>
|
||||
public required Guid MediaContributorId { get; set; }
|
||||
public required Guid MediaContributorId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display name of the role the contributor played in the book.
|
||||
/// Gets the role the contributor played in the book.
|
||||
/// </summary>
|
||||
public required string RoleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the canonical category of the role the contributor played in the book.
|
||||
/// </summary>
|
||||
public required MediaContributorRoleCategory RoleCategory { get; set; }
|
||||
public required MediaContributorRole Role { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time and date when the entity was added.
|
||||
@@ -58,5 +52,5 @@ public class BookContributorEntity : IStorageEntity, IAuditableEntity
|
||||
/// <summary>
|
||||
/// Gets or sets the optional Id of the user that updated the entity.
|
||||
/// </summary>
|
||||
public required Guid? UpdatedBy { get; set; }
|
||||
public Guid? UpdatedBy { get; set; }
|
||||
}
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.Common;
|
||||
using Lumina.Application.Common.DataAccess.Entities.MediaContributors;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary;
|
||||
using Lumina.Domain.SharedKernel.Common.Enums.Common;
|
||||
using System;
|
||||
@@ -185,7 +184,7 @@ public class BookEntity : IStorageEntity, IAuditableEntity
|
||||
/// <summary>
|
||||
/// Gets or sets the Barnes & Noble ID of the book.
|
||||
/// </summary>
|
||||
public string? BarnesAndNobleId { get; set; } = null!;
|
||||
public string? BarnesAndNobleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Apple Books ID of the book.
|
||||
|
||||
@@ -3,6 +3,7 @@ using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
|
||||
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
|
||||
using Lumina.Application.Common.DataAccess.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using Lumina.Application.Common.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -19,7 +20,7 @@ public interface IBookRepository : IRepository<BookEntity>,
|
||||
IUpdateRepositoryAction<BookEntity>,
|
||||
IGetByIdRepositoryAction<BookEntity, Guid>,
|
||||
IGetAllRepositoryAction<BookEntity>,
|
||||
IGetPaginatedRepositoryAction<BookEntity>
|
||||
IGetAllLiteRepositoryAction<BookEntity, BookLiteRow>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets all the books of the media library identified by <paramref name="libraryId"/>.
|
||||
|
||||
Reference in new issue
Block a user