Skip to content

Commit

Permalink
feat : add IAggregateRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoo-Asadnejad committed Jan 12, 2024
1 parent c02885d commit 3e4c6a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Product.Domain.Aggregates.ProductAggregate;

public sealed class ProductModel : BaseEntity
public sealed class ProductModel : BaseEntity , IAggregateRoot
{
public ProductModel(string title, int price, long? categoryId = null, string? subTitle = null,

Check warning on line 8 in Src/Product.Domain/Aggregates/Product/AggregateRoot/ProductModel.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'Category' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 8 in Src/Product.Domain/Aggregates/Product/AggregateRoot/ProductModel.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property '_productComments' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
string? description = null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Product.Domain.Base;

namespace Product.Domain.Aggregates.Product.Entities;

public class ProductComment
public class ProductComment : BaseEntity
{

}
6 changes: 6 additions & 0 deletions Src/Product.Domain/Shared/Base/IAggregateRoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Product.Domain.Base;

public interface IAggregateRoot
{

}

0 comments on commit 3e4c6a3

Please sign in to comment.