mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 07:11:10 +00:00
Implements first stage library management system
This commit is contained in:
1 parent
5e0f94cd82
commit
36352ea9e8
291 files changed
+3733
-1384
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Entities.MediaLibrary.Management;
|
||||
using Lumina.Contracts.Responses.MediaLibrary.Management;
|
||||
using System.Linq;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Mapping.MediaLibrary.Management;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for converting <see cref="LibraryEntity"/>.
|
||||
/// </summary>
|
||||
public static class LibraryEntityMapping
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts <paramref name="repositoryEntity"/> to <see cref="LibraryResponse"/>.
|
||||
/// </summary>
|
||||
/// <param name="repositoryEntity">The repository entity to be converted.</param>
|
||||
/// <returns>The converted response entity.</returns>
|
||||
public static LibraryResponse ToResponse(this LibraryEntity repositoryEntity)
|
||||
{
|
||||
return new LibraryResponse(
|
||||
repositoryEntity.Id,
|
||||
repositoryEntity.UserId,
|
||||
repositoryEntity.Title,
|
||||
repositoryEntity.LibraryType,
|
||||
repositoryEntity.ContentLocations.Select(location => location.Path).ToList(),
|
||||
repositoryEntity.Created,
|
||||
repositoryEntity.Updated
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user