Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions src/Application/Authors/Entities/Author.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ namespace CleanModelContextProtocol.Application.Authors.Entities;

using Application.Reviews.Entities;

/// <summary>
/// A person who writes movie reviews.
/// </summary>
/// <param name="Id">The unique identifier of the author.</param>
/// <param name="FirstName">The author's first name.</param>
/// <param name="LastName">The author's last name.</param>
/// <param name="Reviews">The reviews the author has written.</param>
public record Author(Guid Id, string FirstName, string LastName, ICollection<Review> Reviews = null);
6 changes: 6 additions & 0 deletions src/Application/Authors/Entities/ReviewAuthor.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
namespace CleanModelContextProtocol.Application.Authors.Entities;

/// <summary>
/// The author who wrote a review.
/// </summary>
/// <param name="Id">The unique identifier of the author.</param>
/// <param name="FirstName">The author's first name.</param>
/// <param name="LastName">The author's last name.</param>
public record ReviewAuthor(Guid Id, string FirstName, string LastName);
2 changes: 1 addition & 1 deletion src/Application/Common/Exceptions/NotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void ThrowIfNull(object argument, EntityType entityType)
}

/// <summary>Throws a <see cref="NotFoundException"/></summary>
/// <param name="entityType">The entity type of the <paramref name="argument"/> parameter.</param>
/// <param name="entityType">The entity type that was not found.</param>
public static void Throw(EntityType entityType)
{
throw new NotFoundException($"The {entityType} with the supplied id was not found.");
Expand Down
6 changes: 6 additions & 0 deletions src/Application/Movies/Entities/Movie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ namespace CleanModelContextProtocol.Application.Movies.Entities;

using Application.Reviews.Entities;

/// <summary>
/// A movie that can be reviewed.
/// </summary>
/// <param name="Id">The unique identifier of the movie.</param>
/// <param name="Title">The title of the movie.</param>
/// <param name="Reviews">The reviews written about the movie.</param>
public record Movie(Guid Id, string Title, ICollection<Review> Reviews = null);
5 changes: 5 additions & 0 deletions src/Application/Movies/Entities/ReviewedMovie.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
namespace CleanModelContextProtocol.Application.Movies.Entities;

/// <summary>
/// The movie a review is about.
/// </summary>
/// <param name="Id">The unique identifier of the movie.</param>
/// <param name="Title">The title of the movie.</param>
public record ReviewedMovie(Guid Id, string Title);
7 changes: 7 additions & 0 deletions src/Application/Reviews/Entities/Review.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ namespace CleanModelContextProtocol.Application.Reviews.Entities;
using Application.Authors.Entities;
using Application.Movies.Entities;

/// <summary>
/// A star rating an author has given a movie.
/// </summary>
/// <param name="Id">The unique identifier of the review.</param>
/// <param name="Stars">The star rating, from 1 to 5.</param>
/// <param name="ReviewedMovie">The movie that was reviewed.</param>
/// <param name="ReviewAuthor">The author who wrote the review.</param>
public record Review(
Guid Id,
int Stars,
Expand Down
11 changes: 11 additions & 0 deletions src/Application/Versions/Entities/Version.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
namespace CleanModelContextProtocol.Application.Versions.Entities;

/// <summary>
/// The version details of the running application.
/// </summary>
public class Version
{
/// <summary>
/// The assembly file version.
/// </summary>
/// <example>1.1.0.0</example>
public string FileVersion { get; init; }

/// <summary>
/// The informational version, which can include a pre-release label or commit hash.
/// </summary>
/// <example>1.1.0+e30eba8</example>
public string InformationalVersion { get; init; }
}
Loading