Skip to content

Commit

Permalink
refactor : adjust name spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoo-Asadnejad committed Nov 2, 2023
1 parent 7355c5f commit 714f1be
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Product.Domain.Entities;
using Product.Domain.Base;

namespace Product.Domain.Aggregates.ProductAggregate;

public sealed class CategoryModel : BaseEntity
{
Expand Down
4 changes: 3 additions & 1 deletion Src/Product.Domain/Aggregates/ProductAggregate/Currency.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Product.Domain.ValueObjects;
using Product.Domain.Base;

namespace Product.Domain.Aggregates.ProductAggregate;

public class Currency : ValueObject
{
Expand Down
4 changes: 2 additions & 2 deletions Src/Product.Domain/Aggregates/ProductAggregate/Price.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Product.Domain.Base;
using Product.Domain.Exceptions;
using Product.Domain.ValueObjects;

namespace Product.Domain;
namespace Product.Domain.Aggregates.ProductAggregate;

public class Price : ValueObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Product.Domain.Entities;
using Product.Domain.Base;

namespace Product.Domain.Aggregates.ProductAggregate;

public sealed class ProductModel : BaseEntity
{
Expand Down
7 changes: 2 additions & 5 deletions Src/Product.Domain/Base/BaseEntity.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Product.Domain.Entities;
using Product.Domain.ValueObjects;

namespace Product.Domain.Entities;
namespace Product.Domain.Base;

public abstract class BaseEntity
{
Expand Down Expand Up @@ -90,7 +87,7 @@ public bool IsTransient()

public override bool Equals(object obj)

Check warning on line 88 in Src/Product.Domain/Base/BaseEntity.cs

View workflow job for this annotation

GitHub Actions / build

Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes).
{
if (!(obj is BaseEntity))
if (obj is not BaseEntity)
return false;

if (Object.ReferenceEquals(this, obj))
Expand Down
2 changes: 1 addition & 1 deletion Src/Product.Domain/Base/INotification.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Product.Domain.Entities;
namespace Product.Domain.Base;

public interface INotification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Security;
using Product.Domain.Constants.Messages;
using Product.Domain.Exceptions;
using Product.Domain.Exceptions.Genrals;

namespace Product.Domain.ValueObjects;
namespace Product.Domain.Base;

public class Ip : ValueObject
{
Expand Down
2 changes: 1 addition & 1 deletion Src/Product.Domain/Base/ValueObject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Product.Domain.ValueObjects;
namespace Product.Domain.Base;

public abstract class ValueObject : IEquatable<ValueObject>
{
Expand Down
3 changes: 2 additions & 1 deletion Src/Product.Domain/Exceptions/Genrals/InvalidIpException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Product.Domain.Constants.Messages;
namespace Product.Domain.Exceptions;

namespace Product.Domain.Exceptions.Genrals;

public sealed class InvalidIpException : DomainValidationException
{
Expand Down

0 comments on commit 714f1be

Please sign in to comment.