diff --git a/docs/technical/domain/Aggregates.WrittenContentLibrary.md b/docs/technical/domain/Aggregates.WrittenContentLibrary.md index 7e533671..19bac436 100644 --- a/docs/technical/domain/Aggregates.WrittenContentLibrary.md +++ b/docs/technical/domain/Aggregates.WrittenContentLibrary.md @@ -28,7 +28,7 @@ class Book Optional appleBooksId, List isbns, List contributors, - List ratings); + List ratings); } ``` diff --git a/docs/technical/requests/books/Get.http b/docs/technical/requests/books/GetAll.http similarity index 100% rename from docs/technical/requests/books/Get.http rename to docs/technical/requests/books/GetAll.http diff --git a/src/Lumina.Application/Common/Enums/BookFormat.cs b/src/Lumina.Application/Common/Enums/BookFormat.cs deleted file mode 100644 index 4c8fb8ae..00000000 --- a/src/Lumina.Application/Common/Enums/BookFormat.cs +++ /dev/null @@ -1,25 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System.Text.Json.Serialization; -#endregion - -namespace Lumina.Application.Common.Enums; - -/// -/// Represents the format of a book. -/// -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum BookFormat -{ - Hardcover, - Paperback, - MassMarketPaperback, - TradePaperback, - eBook, - Audiobook, - LargePrint, - BoardBook, - SpiralBound, - LibraryBinding, - LeatherBound, - PopupBook -} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Enums/BookRatingSource.cs b/src/Lumina.Application/Common/Enums/BookRatingSource.cs deleted file mode 100644 index 1153a942..00000000 --- a/src/Lumina.Application/Common/Enums/BookRatingSource.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System.Text.Json.Serialization; -#endregion - -namespace Lumina.Application.Common.Enums; - -/// -/// Enumeration for the various sources of book ratings. -/// -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum BookRatingSource -{ - User, - Goodreads, - Amazon, - GoogleBooks, -} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Enums/IsbnFormat.cs b/src/Lumina.Application/Common/Enums/IsbnFormat.cs deleted file mode 100644 index 507724fe..00000000 --- a/src/Lumina.Application/Common/Enums/IsbnFormat.cs +++ /dev/null @@ -1,15 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System.Text.Json.Serialization; -#endregion - -namespace Lumina.Application.Common.Enums; - -/// -/// Enumeration for the different ISBN (International Standard Book Number) formats. -/// -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum IsbnFormat -{ - Isbn10, - Isbn13 -} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Enums/MediaContributorRole.cs b/src/Lumina.Application/Common/Enums/MediaContributorRole.cs deleted file mode 100644 index db20962d..00000000 --- a/src/Lumina.Application/Common/Enums/MediaContributorRole.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region ========================================================================= USING ===================================================================================== -using System.Text.Json.Serialization; -#endregion - -namespace Lumina.Application.Common.Enums; - -/// -/// Enumeration for the various roles of media contributors across different types of media. -/// -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum MediaContributorRole -{ - Actor, - Director, - Singer, - Author, -} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs b/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs new file mode 100644 index 00000000..32ad74be --- /dev/null +++ b/src/Lumina.Application/Common/Mapping/WrittenContentLibrary/BookLibrary/BookMappingConfig.cs @@ -0,0 +1,131 @@ +#region ========================================================================= USING ===================================================================================== +using Lumina.Application.Common.Models.Books; +using Lumina.Domain.Common.Enums; +using Lumina.Domain.Common.Primitives; +using Lumina.Domain.Common.ValueObjects.Metadata; +using Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggregate.ValueObjects; +using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate; +using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Entities; +using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.ValueObjects; +using Mapster; +#endregion + +namespace Lumina.Application.Common.Mapping.WrittenContentLibrary.BookLibrary; + +/// +/// Mapping configuration for books between the domain object and the persistence object. +/// +public class BookMappingConfig : IRegister +{ + #region ===================================================================== METHODS =================================================================================== + /// + /// Registers the mapping configuration. + /// + /// The type adapter configuration. + public void Register(TypeAdapterConfig config) + { + config.NewConfig() + .Map(dest => dest.Id, src => src.Id.Value) + .Map(dest => dest.Title, src => src.Metadata.Title) + .Map(dest => dest.OriginalTitle, src => src.Metadata.OriginalTitle.HasValue ? src.Metadata.OriginalTitle.Value : default) + .Map(dest => dest.Description, src => src.Metadata.Description.HasValue ? src.Metadata.Description.Value : default) + .Map(dest => dest.OriginalReleaseDate, src => src.Metadata.ReleaseInfo.OriginalReleaseDate.HasValue ? src.Metadata.ReleaseInfo.OriginalReleaseDate.Value : default) + .Map(dest => dest.OriginalReleaseYear, src => src.Metadata.ReleaseInfo.OriginalReleaseYear.HasValue ? src.Metadata.ReleaseInfo.OriginalReleaseYear.Value : default) + .Map(dest => dest.ReReleaseDate, src => src.Metadata.ReleaseInfo.ReReleaseDate.HasValue ? src.Metadata.ReleaseInfo.ReReleaseDate.Value : default) + .Map(dest => dest.ReReleaseYear, src => src.Metadata.ReleaseInfo.ReReleaseYear.HasValue ? src.Metadata.ReleaseInfo.ReReleaseYear.Value : default) + .Map(dest => dest.ReleaseCountry, src => src.Metadata.ReleaseInfo.ReleaseCountry.HasValue ? src.Metadata.ReleaseInfo.ReleaseCountry.Value : default) + .Map(dest => dest.ReleaseVersion, src => src.Metadata.ReleaseInfo.ReleaseVersion.HasValue ? src.Metadata.ReleaseInfo.ReleaseVersion.Value : default) + .Map(dest => dest.LanguageCode, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.LanguageCode : default) + .Map(dest => dest.LanguageName, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.LanguageName : default) + .Map(dest => dest.LanguageNativeName, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.NativeName : default) + .Map(dest => dest.OriginalLanguageCode, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.LanguageCode : default) + .Map(dest => dest.OriginalLanguageName, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.LanguageName : default) + .Map(dest => dest.OriginalLanguageNativeName, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.NativeName : default) + .Map(dest => dest.Tags, src => src.Metadata.Tags) + .Map(dest => dest.Genres, src => src.Metadata.Genres) + .Map(dest => dest.Publisher, src => src.Metadata.Publisher.HasValue ? src.Metadata.Publisher.Value : default) + .Map(dest => dest.PageCount, src => src.Metadata.PageCount.HasValue ? src.Metadata.PageCount.Value : default) + .Map(dest => dest.Format, src => src.Format.ToString()) + .Map(dest => dest.Edition, src => src.Edition.HasValue ? src.Edition.Value : default) + .Map(dest => dest.VolumeNumber, src => src.VolumeNumber.HasValue ? src.VolumeNumber.Value : default) + .Map(dest => dest.ASIN, src => src.ASIN.HasValue ? src.ASIN.Value : default) + .Map(dest => dest.GoodreadsId, src => src.GoodreadsId.HasValue ? src.GoodreadsId.Value : default) + .Map(dest => dest.LCCN, src => src.LCCN.HasValue ? src.LCCN.Value : default) + .Map(dest => dest.OCLCNumber, src => src.OCLCNumber.HasValue ? src.OCLCNumber.Value : default) + .Map(dest => dest.OpenLibraryId, src => src.OpenLibraryId.HasValue ? src.OpenLibraryId.Value : default) + .Map(dest => dest.LibraryThingId, src => src.LibraryThingId.HasValue ? src.LibraryThingId.Value : default) + .Map(dest => dest.GoogleBooksId, src => src.GoogleBooksId.HasValue ? src.GoogleBooksId.Value : default) + .Map(dest => dest.BarnesAndNobleId, src => src.BarnesAndNobleId.HasValue ? src.BarnesAndNobleId.Value : default) + .Map(dest => dest.AppleBooksId, src => src.AppleBooksId.HasValue ? src.AppleBooksId.Value : default) + .Map(dest => dest.ISBNs, src => src.ISBNs) + .Map(dest => dest.Ratings, src => src.Ratings) + .Map(dest => dest.Created, src => src.Created) + .Map(dest => dest.Updated, src => src.Updated); + + config.NewConfig() + .Map(dest => dest.Value, src => src.Value) + .Map(dest => dest.MaxValue, src => src.MaxValue) + .Map(dest => dest.VoteCount, src => src.VoteCount.HasValue ? src.VoteCount.Value : default) + .Map(dest => dest.Source, src => src.Source.HasValue ? src.Source.Value : default); + + config.NewConfig, BookRatingSource?>() + .MapWith(src => src.HasValue ? src.Value : default); + + + config.NewConfig() + .MapWith(src => Book.Create( + BookId.Create(src.Id), + WrittenContentMetadata.Create( + src.Title, + Optional.FromNullable(src.OriginalTitle), + Optional.FromNullable(src.Description), + ReleaseInfo.Create( + Optional.FromNullable(src.OriginalReleaseDate), + Optional.FromNullable(src.OriginalReleaseYear), + Optional.FromNullable(src.ReReleaseDate), + Optional.FromNullable(src.ReReleaseYear), + Optional.FromNullable(src.ReleaseCountry), + Optional.FromNullable(src.ReleaseVersion) + ).Value, + src.Genres.Select(g => Genre.Create(g.Name).Value).ToList(), + src.Tags.Select(t => Tag.Create(t.Name).Value).ToList(), + src.LanguageCode != null ? LanguageInfo.Create( + src.LanguageCode, + src.LanguageName, + Optional.FromNullable(src.LanguageNativeName) + ).Value : Optional.None(), + src.OriginalLanguageCode != null ? LanguageInfo.Create( + src.OriginalLanguageCode, + src.OriginalLanguageName, + Optional.FromNullable(src.OriginalLanguageNativeName) + ).Value : Optional.None(), + Optional.FromNullable(src.Publisher), + Optional.FromNullable(src.PageCount) + ), + Enum.Parse(src.Format), + Optional.FromNullable(src.Edition), + Optional.FromNullable(src.VolumeNumber), + Optional.None(), // Assuming BookSeries is not part of BookDto + Optional.FromNullable(src.ASIN), + Optional.FromNullable(src.GoodreadsId), + Optional.FromNullable(src.LCCN), + Optional.FromNullable(src.OCLCNumber), + Optional.FromNullable(src.OpenLibraryId), + Optional.FromNullable(src.LibraryThingId), + Optional.FromNullable(src.GoogleBooksId), + Optional.FromNullable(src.BarnesAndNobleId), + Optional.FromNullable(src.AppleBooksId), + src.ISBNs.Select(i => Isbn.Create(i.Value, i.Format).Value).ToList(), + new List(), // Assuming MediaContributorId is not part of BookDto + src.Ratings.Select(r => BookRating.Create( + r.Value, + r.MaxValue, + Optional.FromNullable(r.Source), + Optional.FromNullable(r.VoteCount) + ).Value).ToList() + ).Value) // Assuming Create returns ErrorOr, we take the Value + .Ignore(dest => dest.Created) + .Ignore(dest => dest.Updated); + } + #endregion +} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Models/Books/BookDto.cs b/src/Lumina.Application/Common/Models/Books/BookDto.cs index d6fada21..455701d1 100644 --- a/src/Lumina.Application/Common/Models/Books/BookDto.cs +++ b/src/Lumina.Application/Common/Models/Books/BookDto.cs @@ -1,5 +1,5 @@ #region ========================================================================= USING ===================================================================================== -using Lumina.Application.Common.Enums; +using Lumina.Application.Common.Models.Common; #endregion namespace Lumina.Application.Common.Models.Books; @@ -7,22 +7,44 @@ namespace Lumina.Application.Common.Models.Books; /// /// Represents a book. /// -public record BookDto( - WrittenContentMetadataDto Metadata, - BookFormat Format, - string? Edition, - int? VolumeNumber, - BookSeriesDto? Series, - string? ASIN, - string? GoodreadsId, - string? LCCN, - string? OCLCNumber, - string? OpenLibraryId, - string? LibraryThingId, - string? GoogleBooksId, - string? BarnesAndNobleId, - string? AppleBooksId, - List ISBNs, - List Contributors, - List Ratings -); \ No newline at end of file +public class BookDto : IStorageEntity +{ + public Guid Id { get; init; } + public string Title { get; init; } = null!; + public string? OriginalTitle { get; init; } + public string? Description { get; init; } + public DateOnly? OriginalReleaseDate { get; init; } + public int? OriginalReleaseYear { get; init; } + public DateOnly? ReReleaseDate { get; init; } + public int? ReReleaseYear { get; init; } + public string? ReleaseCountry { get; init; } + public string? ReleaseVersion { get; init; } + public string? LanguageCode { get; init; } + public string? LanguageName { get; init; } + public string? LanguageNativeName { get; init; } + public string? OriginalLanguageCode { get; init; } + public string? OriginalLanguageName { get; init; } + public string? OriginalLanguageNativeName { get; init; } + public List Tags { get; init; } = []; + public List Genres { get; init; } = []; + public string? Publisher { get; init; } + public int? PageCount { get; init; } + public string Format { get; init; } = null!; + public string? Edition { get; init; } + public int? VolumeNumber { get; init; } + //public Guid? BookSeriesId { get; init; } = null; + public string? ASIN { get; init; } = null!; + public string? GoodreadsId { get; init; } = null!; + public string? LCCN { get; init; } = null!; + public string? OCLCNumber { get; init; } = null!; + public string? OpenLibraryId { get; init; } = null!; + public string? LibraryThingId { get; init; } = null!; + public string? GoogleBooksId { get; init; } = null!; + public string? BarnesAndNobleId { get; init; } = null!; + public string? AppleBooksId { get; init; } = null!; + public List ISBNs { get; init; } = []; + //public List ContributorIds { get; init; } = []; + public List Ratings { get; init; } = []; + public DateTime Created { get; set; } + public DateTime? Updated { get; set; } +} \ No newline at end of file diff --git a/src/Lumina.Application/Common/Models/Books/BookRatingDto.cs b/src/Lumina.Application/Common/Models/Books/BookRatingDto.cs index c2a6d9f8..ac59a512 100644 --- a/src/Lumina.Application/Common/Models/Books/BookRatingDto.cs +++ b/src/Lumina.Application/Common/Models/Books/BookRatingDto.cs @@ -1,6 +1,6 @@ #region ========================================================================= USING ===================================================================================== -using Lumina.Application.Common.Enums; using Lumina.Application.Common.Models.Common; +using Lumina.Domain.Common.Enums; #endregion namespace Lumina.Application.Common.Models.Books; diff --git a/src/Lumina.Application/Common/Models/Books/IsbnDto.cs b/src/Lumina.Application/Common/Models/Books/IsbnDto.cs index 5663c8b9..9b14eb75 100644 --- a/src/Lumina.Application/Common/Models/Books/IsbnDto.cs +++ b/src/Lumina.Application/Common/Models/Books/IsbnDto.cs @@ -1,5 +1,5 @@ #region ========================================================================= USING ===================================================================================== -using Lumina.Application.Common.Enums; +using Lumina.Domain.Common.Enums; #endregion namespace Lumina.Application.Common.Models.Books; diff --git a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBookCommandHandler.cs b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBookCommandHandler.cs index 3ddf8b1a..790d8740 100644 --- a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBookCommandHandler.cs +++ b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Commands/AddBookCommandHandler.cs @@ -1,5 +1,8 @@ #region ========================================================================= USING ===================================================================================== using ErrorOr; +using Lumina.Application.Common.DataAccess.Repositories.Books; +using Lumina.Application.Common.DataAccess.UoW; +using Lumina.Application.Common.Models.Books; using Lumina.Domain.Common.Enums; using Lumina.Domain.Common.Primitives; using Lumina.Domain.Common.ValueObjects.Metadata; @@ -7,6 +10,7 @@ using Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggregate.V using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate; using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Entities; using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.ValueObjects; +using MapsterMapper; using Mediator; #endregion @@ -17,6 +21,24 @@ namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Comma /// public class AddBookCommandHandler : IRequestHandler> { + #region ================================================================== FIELD MEMBERS ================================================================================ + private readonly IUnitOfWork _unitOfWork; + private readonly IMapper _mapper; + #endregion + + #region ====================================================================== CTOR ===================================================================================== + /// + /// Initializes a new instance of the class. + /// + /// Injected unit of work for interacting with the data access layer repositories. + /// Injected service for mapping objects. + public AddBookCommandHandler(IUnitOfWork unitOfWork, IMapper mapper) + { + _unitOfWork = unitOfWork; + _mapper = mapper; + } + #endregion + #region ===================================================================== METHODS =================================================================================== /// /// Handles the command to add a book. @@ -29,7 +51,7 @@ public class AddBookCommandHandler : IRequestHandler> Handle(AddBookCommand request, CancellationToken cancellationToken) { // TODO: update Api.Book.md documentation when the functionality is fully implemented - List contributorIds = new(); + List contributorIds = []; foreach(var mediaContributor in request.Contributors) { // TODO: add logic to search the media contributors repository for existing contributors, based on the provided names @@ -49,7 +71,7 @@ public class AddBookCommandHandler : IRequestHandler domainRatings = domainRatingsResult.Select(rating => rating.Value as Rating).ToList(); + List domainRatings = domainRatingsResult.Select(rating => rating.Value).ToList(); var domainGenresResult = request.Metadata.Genres.ConvertAll(genre => Genre.Create(genre.Name)); errors = domainGenresResult.Where(genreResult => genreResult.IsError).SelectMany(genreResult => genreResult.Errors).ToList(); @@ -137,6 +159,14 @@ public class AddBookCommandHandler : IRequestHandler(); + var persistenceBook = _mapper.Map(createBookResult.Value); + var insertBookResult = await bookRepository.InsertAsync(persistenceBook, cancellationToken); + if (insertBookResult.IsError) + return insertBookResult.Errors; + await _unitOfWork.SaveChangesAsync(cancellationToken); + return createBookResult.Value; } #endregion diff --git a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQuery.cs b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQuery.cs new file mode 100644 index 00000000..c1fa4bb6 --- /dev/null +++ b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQuery.cs @@ -0,0 +1,12 @@ +#region ========================================================================= USING ===================================================================================== +using ErrorOr; +using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate; +using Mediator; +#endregion + +namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries; + +/// +/// Query for getting all books. +/// +public record class GetBooksQuery() : IRequest>>; \ No newline at end of file diff --git a/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQueryHandler.cs b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQueryHandler.cs new file mode 100644 index 00000000..ab81aa78 --- /dev/null +++ b/src/Lumina.Application/Core/WrittenContentLibrary/BooksLibrary/Books/Queries/GetBooksQueryHandler.cs @@ -0,0 +1,53 @@ +#region ========================================================================= USING ===================================================================================== +using ErrorOr; +using Lumina.Application.Common.DataAccess.Repositories.Books; +using Lumina.Application.Common.DataAccess.UoW; +using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate; +using MapsterMapper; +using Mediator; +#endregion + +namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries; + +/// +/// Handler for the query to get all books. +/// +public class GetBooksQueryHandler : IRequestHandler>> +{ + #region ================================================================== FIELD MEMBERS ================================================================================ + private readonly IUnitOfWork _unitOfWork; + private readonly IMapper _mapper; + #endregion + + #region ====================================================================== CTOR ===================================================================================== + /// + /// Initializes a new instance of the class. + /// + /// Injected unit of work for interacting with the data access layer repositories. + /// Injected service for mapping objects. + public GetBooksQueryHandler(IUnitOfWork unitOfWork, IMapper mapper) + { + _unitOfWork = unitOfWork; + _mapper = mapper; + } + #endregion + + #region ===================================================================== METHODS =================================================================================== + /// + /// Handles the query to get all books. + /// + /// The request to be handled. + /// Cancellation token that can be used to stop the execution. + /// + /// An containing either a collection of , or an error message. + /// + public async ValueTask>> Handle(GetBooksQuery request, CancellationToken cancellationToken) + { + var bookRepository = _unitOfWork.GetRepository(); + var getBooksResult = await bookRepository.GetAllAsync(cancellationToken).ConfigureAwait(false); + if (getBooksResult.IsError) + return getBooksResult.Errors; + return ErrorOrFactory.From(getBooksResult.Value.Select(book => _mapper.Map(book))); + } + #endregion +} diff --git a/src/Lumina.Application/Lumina.Application.csproj b/src/Lumina.Application/Lumina.Application.csproj index 1ef8b479..c712c2db 100644 --- a/src/Lumina.Application/Lumina.Application.csproj +++ b/src/Lumina.Application/Lumina.Application.csproj @@ -1,27 +1,27 @@  - - net8.0 - enable - enable - ..\..\bin\ - + + net8.0 + enable + enable + ..\..\bin\ + - - - + + + - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + diff --git a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs index c4c01d5d..264dc0db 100644 --- a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs +++ b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs @@ -4,20 +4,11 @@ /// Base class for all domain Aggregate Roots. /// /// The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type. -/// The type of the unique identifier for the Aggregate Root. It should be a non-nullable type. -public abstract class AggregateRoot : Entity where TId : notnull, AggregateRootId - where TIdType : notnull +public abstract class AggregateRoot : Entity where TId : notnull { - #region ==================================================================== PROPERTIES ================================================================================= - /// - /// Gets the unique identifier of the Aggregate Root. - /// - public new AggregateRootId Id { get; protected set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The id of the entity. protected AggregateRoot(TId id) : base(id) @@ -27,7 +18,7 @@ public abstract class AggregateRoot : Entity where TId : notn #pragma warning disable CS8618 /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// protected AggregateRoot() // only needed during reflection { diff --git a/src/Lumina.Domain/Common/Models/Core/AggregateRootId.cs b/src/Lumina.Domain/Common/Models/Core/AggregateRootId.cs deleted file mode 100644 index 64893a2e..00000000 --- a/src/Lumina.Domain/Common/Models/Core/AggregateRootId.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Lumina.Domain.Common.Models.Core; - -/// -/// Base identity class for all domain Aggregate Roots. -/// -/// The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type. -public abstract class AggregateRootId : ValueObject where TId : notnull -{ - #region ==================================================================== PROPERTIES ================================================================================= - /// - /// Gets the unique identifier of the Aggregate Root. - /// - public abstract TId Value { get; protected set; } - #endregion -} \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/Entity.cs b/src/Lumina.Domain/Common/Models/Core/Entity.cs index 470a1875..dd06b854 100644 --- a/src/Lumina.Domain/Common/Models/Core/Entity.cs +++ b/src/Lumina.Domain/Common/Models/Core/Entity.cs @@ -11,6 +11,16 @@ public abstract class Entity : IEquatable> where TId : notnull /// Gets the unique identifier of the entity. /// public TId Id { get; protected set; } + + /// + /// Gets the date and time when the entity was created. + /// + public DateTime Created { get; set; } + + /// + /// Gets the date and time when the entity was last updated. + /// + public DateTime? Updated { get; set; } #endregion #region ====================================================================== CTOR ===================================================================================== diff --git a/src/Lumina.Domain/Common/Models/Core/EntityId.cs b/src/Lumina.Domain/Common/Models/Core/EntityId.cs new file mode 100644 index 00000000..65002631 --- /dev/null +++ b/src/Lumina.Domain/Common/Models/Core/EntityId.cs @@ -0,0 +1,57 @@ +#region ========================================================================= USING ===================================================================================== +using System.Diagnostics; +#endregion + +namespace Lumina.Domain.Common.Models.Core; + +/// +/// Base class for all entity identifiers. +/// +/// The type of the identifier. +[DebuggerDisplay("{Value}")] +public abstract class EntityId : ValueObject +{ + #region ==================================================================== PROPERTIES ================================================================================= + public TId Value { get; } + #endregion + + #region ====================================================================== CTOR ===================================================================================== + /// + /// Overload C-tor. + /// + /// The value representing this object. + protected EntityId(TId value) + { + Value = value; + } + +#pragma warning disable CS8618 + /// + /// Default C-tor. + /// + protected EntityId() + { + } +#pragma warning restore CS8618 + #endregion + + #region ===================================================================== METHODS =================================================================================== + /// + /// Gets the list of items that define equality of the object. + /// + /// A list of items defining the equality. + public override IEnumerable GetEqualityComponents() + { + yield return Value; + } + + /// + /// Customized ToString() method. + /// + /// Custom string value showing relevant data for current class. + public override string? ToString() + { + return Value?.ToString() ?? base.ToString(); + } + #endregion +} \ No newline at end of file diff --git a/src/Lumina.Domain/Common/Models/Core/ValueObject.cs b/src/Lumina.Domain/Common/Models/Core/ValueObject.cs index 2c516bfa..05faef4c 100644 --- a/src/Lumina.Domain/Common/Models/Core/ValueObject.cs +++ b/src/Lumina.Domain/Common/Models/Core/ValueObject.cs @@ -11,7 +11,7 @@ public abstract class ValueObject : IEquatable /// Gets the list of items that define equality of the object. /// /// A list of items defining the equality. - public abstract IEnumerable GetEqualityComponents(); + public abstract IEnumerable GetEqualityComponents(); /// /// Indicates whether the current object is equal to another object of the same type. @@ -42,7 +42,7 @@ public abstract class ValueObject : IEquatable /// The left operand of equality. /// The right operand of equality. /// if is equal to , otherwise. - public static bool operator ==(ValueObject left, ValueObject right) + public static bool operator ==(ValueObject? left, ValueObject? right) { return Equals(left, right); } @@ -53,7 +53,7 @@ public abstract class ValueObject : IEquatable /// The left operand of equality. /// The right operand of equality. /// if is not equal to , otherwise. - public static bool operator !=(ValueObject left, ValueObject right) + public static bool operator !=(ValueObject? left, ValueObject? right) { return !Equals(left, right); } diff --git a/src/Lumina.Domain/Common/Primitives/Optional.cs b/src/Lumina.Domain/Common/Primitives/Optional.cs index 00b197f4..d92fd2d7 100644 --- a/src/Lumina.Domain/Common/Primitives/Optional.cs +++ b/src/Lumina.Domain/Common/Primitives/Optional.cs @@ -91,5 +91,14 @@ public readonly struct Optional { return value.HasValue ? Some(value.Value) : None(); } + + /// + /// Customized ToString() method. + /// + /// Custom string value showing relevant data for current class. + public override string ToString() + { + return HasValue ? Value?.ToString()! : string.Empty; + } #endregion } \ No newline at end of file diff --git a/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs b/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs index ee5ccd7d..cdbf9334 100644 --- a/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs +++ b/src/Lumina.Domain/Common/ValueObjects/Metadata/LanguageInfo.cs @@ -17,17 +17,17 @@ public class LanguageInfo : ValueObject /// /// Gets the ISO 639-1 two-letter language code. /// - public string LanguageCode { get; } + public string LanguageCode { get; private set; } /// /// Gets the full name of the language in English. /// - public string LanguageName { get; } + public string LanguageName { get; private set; } /// /// Gets an optional native name of the language. /// - public Optional NativeName { get; } + public Optional NativeName { get; private set; } #endregion #region ====================================================================== CTOR ===================================================================================== diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs index 7ebf8785..00cb0ddc 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/MediaContributor.cs @@ -14,7 +14,7 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega /// Aggregate Root for a media contributor. /// [DebuggerDisplay("{Id}: {Name}")] -public class MediaContributor : AggregateRoot +public class MediaContributor : AggregateRoot { #region ==================================================================== PROPERTIES ================================================================================= /// diff --git a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs index 00efc868..0f67a94b 100644 --- a/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs +++ b/src/Lumina.Domain/Core/Aggregates/MediaContributor/MediaContributorAggregate/ValueObjects/MediaContributorId.cs @@ -7,23 +7,15 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega /// /// Value Object for the Id of a media contributor. /// -public sealed class MediaContributorId : AggregateRootId +public sealed class MediaContributorId : EntityId { - #region ==================================================================== PROPERTIES ================================================================================= - /// - /// Gets the value of this object. - /// - public override Guid Value { get; protected set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// /// The value representing this object. - private MediaContributorId(Guid value) + private MediaContributorId(Guid value) : base(value) { - Value = value; } #endregion diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs index 30f5b44e..2f481a09 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/Book.cs @@ -16,11 +16,11 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega /// Aggregate root for a book. /// [DebuggerDisplay("{Id}: {Title}")] -public sealed class Book : AggregateRoot +public sealed class Book : AggregateRoot { #region ================================================================== FIELD MEMBERS ================================================================================ private readonly List _contributors; - private readonly List _ratings; + private readonly List _ratings; private readonly List _isbns; #endregion @@ -114,7 +114,7 @@ public sealed class Book : AggregateRoot /// /// Gets the list of ratings for this book. /// - public IReadOnlyCollection Ratings + public IReadOnlyCollection Ratings { get { return _ratings.AsReadOnly(); } } @@ -160,7 +160,7 @@ public sealed class Book : AggregateRoot Optional appleBooksId, List isbns, List contributors, - List ratings) : base(id) + List ratings) : base(id) { Id = id; Metadata = metadata; @@ -234,7 +234,7 @@ public sealed class Book : AggregateRoot Optional appleBooksId, List isbns, List contributors, - List ratings) + List ratings) { // TODO: enforce invariants return new Book( @@ -300,7 +300,7 @@ public sealed class Book : AggregateRoot Optional appleBooksId, List isbns, List contributors, - List ratings) + List ratings) { // TODO: enforce invariants return new Book( diff --git a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs index 5155c3f7..f1e90d40 100644 --- a/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs +++ b/src/Lumina.Domain/Core/Aggregates/WrittenContentLibrary/BookLibraryAggregate/ValueObjects/BookId.cs @@ -7,23 +7,15 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega /// /// Value Object for the Id of a book. /// -public sealed class BookId : AggregateRootId +public sealed class BookId : EntityId { - #region ==================================================================== PROPERTIES ================================================================================= - /// - /// Gets the value of the . - /// - public override Guid Value { get; protected set; } - #endregion - #region ====================================================================== CTOR ===================================================================================== /// /// Initializes a new instance of the class. /// /// The value representing this object. - private BookId(Guid value) + private BookId(Guid value) : base(value) { - Value = value; } #endregion diff --git a/src/Lumina.Domain/Lumina.Domain.csproj b/src/Lumina.Domain/Lumina.Domain.csproj index c3f6698c..ce39b430 100644 --- a/src/Lumina.Domain/Lumina.Domain.csproj +++ b/src/Lumina.Domain/Lumina.Domain.csproj @@ -1,14 +1,14 @@  - - net8.0 - enable - enable - ..\..\bin\ - + + net8.0 + enable + enable + ..\..\bin\ + - - - + + + diff --git a/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj b/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj index ba592b0c..d9a1d820 100644 --- a/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj +++ b/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj @@ -1,33 +1,33 @@  - - net8.0 - enable - enable - ..\..\bin\ - + + net8.0 + enable + enable + ..\..\bin\ + - - - - - - - - + + + + + + + + - - - PreserveNewest - - - PreserveNewest - appsettings.shared.json - - + + + PreserveNewest + + + PreserveNewest + appsettings.shared.json + + - - - + + + diff --git a/src/Lumina.Presentation.Api/Common/Contracts/Books/AddBookRequest.cs b/src/Lumina.Presentation.Api/Common/Contracts/Books/AddBookRequest.cs index c8fb1c1c..cd267940 100644 --- a/src/Lumina.Presentation.Api/Common/Contracts/Books/AddBookRequest.cs +++ b/src/Lumina.Presentation.Api/Common/Contracts/Books/AddBookRequest.cs @@ -1,7 +1,7 @@ #region ========================================================================= USING ===================================================================================== -using Lumina.Application.Common.Enums; using Lumina.Application.Common.Models.Books; using Lumina.Application.Common.Models.Contributors; +using Lumina.Domain.Common.Enums; #endregion namespace Lumina.Presentation.Api.Common.Contracts.Books; diff --git a/src/Lumina.Presentation.Api/Common/Mapping/BookMappingConfig.cs b/src/Lumina.Presentation.Api/Common/Mapping/BookMappingConfig.cs index 07301d73..0f72be94 100644 --- a/src/Lumina.Presentation.Api/Common/Mapping/BookMappingConfig.cs +++ b/src/Lumina.Presentation.Api/Common/Mapping/BookMappingConfig.cs @@ -7,7 +7,7 @@ using Mapster; namespace Lumina.Presentation.Api.Common.Mapping; /// -/// Mapping configuration for books. +/// Mapping configuration for books between the API request object and the command object. /// public class BookMappingConfig : IRegister { diff --git a/src/Lumina.Presentation.Api/Controllers/Books/BooksController.cs b/src/Lumina.Presentation.Api/Controllers/Books/BooksController.cs index bbe1b0fa..4c4887a7 100644 --- a/src/Lumina.Presentation.Api/Controllers/Books/BooksController.cs +++ b/src/Lumina.Presentation.Api/Controllers/Books/BooksController.cs @@ -1,5 +1,6 @@ #region ========================================================================= USING ===================================================================================== using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands; +using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries; using Lumina.Presentation.Api.Common.Contracts.Books; using Lumina.Presentation.Api.Controllers.Common; using MapsterMapper; @@ -41,9 +42,8 @@ public class BooksController : ApiController [HttpGet()] public async Task GetBooks() { - // ErrorOr> result = await mediator.Send(new GetBooksQuery()); - // return result.Match(result => Ok(result), errors => Problem(errors)); - return Ok(new List { "Book 1", "Book 2", "Book 3" }); + var result = await _mediator.Send(new GetBooksQuery()); + return result.Match(result => Ok(result), errors => Problem(errors)); } /// diff --git a/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj b/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj index 064a3a6d..41502109 100644 --- a/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj +++ b/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj @@ -1,39 +1,44 @@ - + - - net8.0 - enable - enable - ..\..\bin\ - + + net8.0 + enable + enable + ..\..\bin\ + - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - PreserveNewest - - - PreserveNewest - appsettings.shared.json - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - - + + + PreserveNewest + + + PreserveNewest + appsettings.shared.json + + + + + + + + diff --git a/src/Lumina.Presentation.Api/Program.cs b/src/Lumina.Presentation.Api/Program.cs index 314ca370..377801ca 100644 --- a/src/Lumina.Presentation.Api/Program.cs +++ b/src/Lumina.Presentation.Api/Program.cs @@ -2,6 +2,7 @@ using Lumina.Presentation.Api.Common.DependencyInjection; using Lumina.Application.Common.DependencyInjection; using Lumina.Infrastructure.Common.DependencyInjection; +using Lumina.DataAccess.Common.DependencyInjection; #endregion namespace Lumina.Presentation.Api; @@ -26,6 +27,7 @@ public class Program builder.Services.AddApplicationLayerServices(); builder.Services.AddPresentationApiLayerServices(); builder.Services.AddInfrastructureLayerServices(); + builder.Services.AddDataAccessLayerServices(); var app = builder.Build(); diff --git a/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj b/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj index 18a99d42..5bd0e63b 100644 --- a/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj +++ b/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj @@ -1,15 +1,15 @@ - - net8.0 - enable - enable - ..\..\bin\ - + + net8.0 + enable + enable + ..\..\bin\ + - - - - + + + + diff --git a/src/Lumina.sln b/src/Lumina.sln index 34701212..927cd3a5 100644 --- a/src/Lumina.sln +++ b/src/Lumina.sln @@ -3,27 +3,65 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Application", "Lumina.Application\Lumina.Application.csproj", "{7B2671B3-E9C5-41AD-BB0C-692238558197}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Application", "Lumina.Application\Lumina.Application.csproj", "{7B2671B3-E9C5-41AD-BB0C-692238558197}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.DataAccess", "Lumina.DataAccess\Lumina.DataAccess.csproj", "{7FEA2A01-1660-4D18-B05D-83D356FD7828}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.DataAccess", "Lumina.DataAccess\Lumina.DataAccess.csproj", "{7FEA2A01-1660-4D18-B05D-83D356FD7828}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Domain", "Lumina.Domain\Lumina.Domain.csproj", "{9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Domain", "Lumina.Domain\Lumina.Domain.csproj", "{9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Infrastructure", "Lumina.Infrastructure\Lumina.Infrastructure.csproj", "{D43E63EA-2210-471E-BFED-D1D33D196554}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Infrastructure", "Lumina.Infrastructure\Lumina.Infrastructure.csproj", "{D43E63EA-2210-471E-BFED-D1D33D196554}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Api", "Lumina.Presentation.Api\Lumina.Presentation.Api.csproj", "{7A49A922-127C-4786-84B7-53E64D816336}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Api", "Lumina.Presentation.Api\Lumina.Presentation.Api.csproj", "{7A49A922-127C-4786-84B7-53E64D816336}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Web", "Lumina.Presentation.Web\Lumina.Presentation.Web.csproj", "{FABC255B-0D21-4A0A-A0E2-7759D929B4D3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Web", "Lumina.Presentation.Web\Lumina.Presentation.Web.csproj", "{FABC255B-0D21-4A0A-A0E2-7759D929B4D3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Application.UnitTests", "..\tests\UnitTests\Lumina.Application.UnitTests\Lumina.Application.UnitTests.csproj", "{4DEA94AF-D592-4187-8850-A569C93256C9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Application.UnitTests", "..\tests\UnitTests\Lumina.Application.UnitTests\Lumina.Application.UnitTests.csproj", "{4DEA94AF-D592-4187-8850-A569C93256C9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Infrastructure.UnitTests", "..\tests\UnitTests\Lumina.Infrastructure.UnitTests\Lumina.Infrastructure.UnitTests.csproj", "{8DB5300A-B38A-4F6D-8FF7-A722DA47667E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Infrastructure.UnitTests", "..\tests\UnitTests\Lumina.Infrastructure.UnitTests\Lumina.Infrastructure.UnitTests.csproj", "{8DB5300A-B38A-4F6D-8FF7-A722DA47667E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.DataAccess.UnitTests", "..\tests\UnitTests\Lumina.DataAccess.UnitTests\Lumina.DataAccess.UnitTests.csproj", "{6050F6A9-F136-4B7B-82D2-57E689463ACA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.DataAccess.UnitTests", "..\tests\UnitTests\Lumina.DataAccess.UnitTests\Lumina.DataAccess.UnitTests.csproj", "{6050F6A9-F136-4B7B-82D2-57E689463ACA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Domain.UnitTests", "..\tests\UnitTests\Lumina.Domain.UnitTests\Lumina.Domain.UnitTests.csproj", "{3BB42EB9-A0A3-4E3F-9053-785F429714AE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Domain.UnitTests", "..\tests\UnitTests\Lumina.Domain.UnitTests\Lumina.Domain.UnitTests.csproj", "{3BB42EB9-A0A3-4E3F-9053-785F429714AE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Api.UnitTests", "..\tests\UnitTests\Lumina.Presentation.Api.UnitTests\Lumina.Presentation.Api.UnitTests.csproj", "{4D5E4789-8437-4F3B-883E-28BBF8A4848F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Api.UnitTests", "..\tests\UnitTests\Lumina.Presentation.Api.UnitTests\Lumina.Presentation.Api.UnitTests.csproj", "{4D5E4789-8437-4F3B-883E-28BBF8A4848F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C316ABB-08D5-4450-9A4E-91059DB54254}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{16E590D3-DD9F-4B45-BF19-C6E317A57D11}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{53B1231B-37F5-44BA-80D5-DBA979775F5C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{ACD16983-F1BD-4A92-B282-95BA8C456F6A}" + ProjectSection(SolutionItems) = preProject + ..\docs\LICENSE.md = ..\docs\LICENSE.md + ..\README.md = ..\README.md + ..\docs\SOURCES.md = ..\docs\SOURCES.md + ..\docs\USAGE.md = ..\docs\USAGE.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "technical", "technical", "{0C0E5A56-AD29-4D0B-AB87-E865F8B933E2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{B045C2EC-3ACB-47D3-BE62-7AC334B023D9}" + ProjectSection(SolutionItems) = preProject + ..\docs\technical\api\Api.Book.md = ..\docs\technical\api\Api.Book.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "domain", "domain", "{4F8D14A3-A465-4EC2-B175-A188B113AB99}" + ProjectSection(SolutionItems) = preProject + ..\docs\technical\domain\Aggregates.FileManagement.md = ..\docs\technical\domain\Aggregates.FileManagement.md + ..\docs\technical\domain\Aggregates.VideoLibrary.md = ..\docs\technical\domain\Aggregates.VideoLibrary.md + ..\docs\technical\domain\Aggregates.WrittenContentLibrary.md = ..\docs\technical\domain\Aggregates.WrittenContentLibrary.md + ..\docs\technical\domain\Common.Metadata.md = ..\docs\technical\domain\Common.Metadata.md + ..\docs\technical\domain\UbiquitousLanguage.md = ..\docs\technical\domain\UbiquitousLanguage.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "requests", "requests", "{C17A1188-FA69-42BC-92E6-4F91D31B3A58}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "books", "books", "{FAFD9E43-508B-4F20-8AA2-8CADA697ED2D}" + ProjectSection(SolutionItems) = preProject + ..\docs\technical\requests\books\Add.http = ..\docs\technical\requests\books\Add.http + ..\docs\technical\requests\books\GetAll.http = ..\docs\technical\requests\books\GetAll.http + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -79,4 +117,26 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {7B2671B3-E9C5-41AD-BB0C-692238558197} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {7FEA2A01-1660-4D18-B05D-83D356FD7828} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {D43E63EA-2210-471E-BFED-D1D33D196554} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {7A49A922-127C-4786-84B7-53E64D816336} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {FABC255B-0D21-4A0A-A0E2-7759D929B4D3} = {3C316ABB-08D5-4450-9A4E-91059DB54254} + {4DEA94AF-D592-4187-8850-A569C93256C9} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} + {8DB5300A-B38A-4F6D-8FF7-A722DA47667E} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} + {6050F6A9-F136-4B7B-82D2-57E689463ACA} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} + {3BB42EB9-A0A3-4E3F-9053-785F429714AE} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} + {4D5E4789-8437-4F3B-883E-28BBF8A4848F} = {53B1231B-37F5-44BA-80D5-DBA979775F5C} + {53B1231B-37F5-44BA-80D5-DBA979775F5C} = {16E590D3-DD9F-4B45-BF19-C6E317A57D11} + {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2} = {ACD16983-F1BD-4A92-B282-95BA8C456F6A} + {B045C2EC-3ACB-47D3-BE62-7AC334B023D9} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2} + {4F8D14A3-A465-4EC2-B175-A188B113AB99} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2} + {C17A1188-FA69-42BC-92E6-4F91D31B3A58} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2} + {FAFD9E43-508B-4F20-8AA2-8CADA697ED2D} = {C17A1188-FA69-42BC-92E6-4F91D31B3A58} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4A55A28E-C657-4A0B-95EA-2931AE66004E} + EndGlobalSection EndGlobal diff --git a/tests/UnitTests/Lumina.Application.UnitTests/Lumina.Application.UnitTests.csproj b/tests/UnitTests/Lumina.Application.UnitTests/Lumina.Application.UnitTests.csproj index 11d1b5ec..0bad1f6a 100644 --- a/tests/UnitTests/Lumina.Application.UnitTests/Lumina.Application.UnitTests.csproj +++ b/tests/UnitTests/Lumina.Application.UnitTests/Lumina.Application.UnitTests.csproj @@ -1,31 +1,31 @@ - - net8.0 - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + + + diff --git a/tests/UnitTests/Lumina.DataAccess.UnitTests/Lumina.DataAccess.UnitTests.csproj b/tests/UnitTests/Lumina.DataAccess.UnitTests/Lumina.DataAccess.UnitTests.csproj index a88a3b0c..110f9121 100644 --- a/tests/UnitTests/Lumina.DataAccess.UnitTests/Lumina.DataAccess.UnitTests.csproj +++ b/tests/UnitTests/Lumina.DataAccess.UnitTests/Lumina.DataAccess.UnitTests.csproj @@ -1,31 +1,31 @@ - - net8.0 - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + + + diff --git a/tests/UnitTests/Lumina.Domain.UnitTests/Lumina.Domain.UnitTests.csproj b/tests/UnitTests/Lumina.Domain.UnitTests/Lumina.Domain.UnitTests.csproj index cf6a32f8..cf923aca 100644 --- a/tests/UnitTests/Lumina.Domain.UnitTests/Lumina.Domain.UnitTests.csproj +++ b/tests/UnitTests/Lumina.Domain.UnitTests/Lumina.Domain.UnitTests.csproj @@ -1,31 +1,31 @@ - - net8.0 - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + + + diff --git a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Lumina.Infrastructure.UnitTests.csproj b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Lumina.Infrastructure.UnitTests.csproj index c6daac17..f482e7cc 100644 --- a/tests/UnitTests/Lumina.Infrastructure.UnitTests/Lumina.Infrastructure.UnitTests.csproj +++ b/tests/UnitTests/Lumina.Infrastructure.UnitTests/Lumina.Infrastructure.UnitTests.csproj @@ -1,32 +1,32 @@ - - net8.0 - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + + + diff --git a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Lumina.Presentation.Api.UnitTests.csproj b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Lumina.Presentation.Api.UnitTests.csproj index acafb347..2e19ff5d 100644 --- a/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Lumina.Presentation.Api.UnitTests.csproj +++ b/tests/UnitTests/Lumina.Presentation.Api.UnitTests/Lumina.Presentation.Api.UnitTests.csproj @@ -1,31 +1,31 @@ - - net8.0 - enable - enable + + net8.0 + enable + enable - false - true - + false + true + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - + + +