Moves repository entities to Application layer for joint access

This commit is contained in:
BinaryAlley committed 2024-11-04 19:40:11 +02:00
1 parent baf9854355
commit 7321fb89e2
120 files changed
+2606 -784

No files matched your search

@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a genre.
/// </summary>
/// <param name="Name">Gets the name of the genre.</param>
[DebuggerDisplay("Name: {Name}")]
public record GenreDto(
string? Name
);
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// 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 LanguageInfoDto(
string? LanguageCode,
string? LanguageName,
string? NativeName
);
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// 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 RatingDto(
decimal? Value,
decimal? MaxValue,
int? VoteCount
);
@@ -0,0 +1,25 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// 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>
/// <param name="ReReleaseDate">Gets the re-release date of the content, if applicable.</param>
/// <param name="ReReleaseYear">Gets the re-release year of the content, if applicable.</param>
/// <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 ReleaseInfoDto(
DateOnly? OriginalReleaseDate,
int? OriginalReleaseYear,
DateOnly? ReReleaseDate,
int? ReReleaseYear,
string? ReleaseCountry,
string? ReleaseVersion
);
+14
View File
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.Common;
/// <summary>
/// Data transfer object for a tag.
/// </summary>
/// <param name="Name">Gets the name of the tag.</param>
[DebuggerDisplay("Name: {Name}")]
public record TagDto(
string? Name
);
@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.FileSystemManagement;
/// <summary>
/// Generic filesystem data transfer object.
/// </summary>
/// <param name="Path">The path of the file system item.</param>
/// <param name="Name">The name of the file system item.</param>
/// <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 FileSystemItemDto(
string Path,
string Name,
DateTime DateCreated,
DateTime DateModified
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaContributors;
/// <summary>
/// Repository entity for a media contributor.
/// </summary>
/// <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 MediaContributorDto(
MediaContributorNameDto? Name,
MediaContributorRoleDto? Role
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaContributors;
/// <summary>
/// Repository entity for a media contributor name.
/// </summary>
/// <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 MediaContributorNameDto(
string? DisplayName,
string? LegalName
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaContributors;
/// <summary>
/// Repository entity for a media contributor role.
/// </summary>
/// <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 MediaContributorRoleDto(
string? Name,
string? Category
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaLibrary.Management;
/// <summary>
/// Repository entity for a media library content location.
/// </summary>
[DebuggerDisplay("Path: {Path}")]
public class LibraryContentLocationDto
{
/// <summary>
/// Gets or sets the path of the media library content location.
/// </summary>
public required string Path { get; set; }
}
@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.Common;
using Lumina.Domain.Common.Enums.BookLibrary;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
/// <summary>
/// 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 BookRatingDto(
decimal? Value,
decimal? MaxValue,
BookRatingSource? Source,
int? VoteCount
) : RatingDto(Value, MaxValue, VoteCount);
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Data transfer object for book series.
/// </summary>
/// <param name="Title">The title of the book series.</param>
[DebuggerDisplay("Title: {Title}")]
public record BookSeriesDto(
string? Title
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.Common.Enums.BookLibrary;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Repository entity for ISBN information.
/// </summary>
/// <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 IsbnDto(
string? Value,
IsbnFormat? Format
);
@@ -0,0 +1,34 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.DTO.Common;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.DTO.MediaLibrary.WrittenContentLibrary;
/// <summary>
/// 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>
/// <param name="Description">Gets a brief description or summary of the written content.</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 written content.</param>
/// <param name="Tags">The list of tags that further describe or categorize the written content.</param>
/// <param name="Language">The language in which the written content is written.</param>
/// <param name="OriginalLanguage">The original language of the written content, if it has been translated.</param>
/// <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 WrittenContentMetadataDto(
string? Title,
string? OriginalTitle,
string? Description,
ReleaseInfoDto? ReleaseInfo,
List<GenreDto>? Genres,
List<TagDto>? Tags,
LanguageInfoDto? Language,
LanguageInfoDto? OriginalLanguage,
string? Publisher,
int? PageCount
);