Skip to content

Commit

Permalink
removing aggregates with more pragmatic code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEggenberger committed Nov 4, 2024
1 parent 04ce116 commit bc1aeae
Show file tree
Hide file tree
Showing 68 changed files with 130 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Commands
{
public class AddMessageToChannel : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Commands
{
public class ChangeChannelName : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Commands
{
public class CreateChannel : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Commands
{
public class DeleteChannel : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Command;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Commands
{
public class DeleteMessageFromChannel : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events;
using Modules.Channels.Features.DomainFeatures.Channels.Events;
using Shared.Features.Messaging.DomainEvent;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.EventHandlers
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.EventHandlers
{
public class ChannelMessagesUpdatedEventHandler : IDomainEventHandler<MessageVotesUpdatedEvent>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Query;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Queries
{
public class GetAllChannels : IQuery<List<Channel>>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Query;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Queries
{
public class AllMessagesForChannel : IQuery<List<Channel>>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Modules.Channels.Features.Infrastructure.EFCore;
using Shared.Features.Messaging.Query;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Queries
{
public class GetChannelById : IQuery<Channel>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Query;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries
namespace Modules.Channels.Features.DomainFeatures.Channels.Application.Queries
{
public class GetMessageById : IQuery<Message>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events;
using Modules.Channels.Features.DomainFeatures.Channels.Events;
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate
namespace Modules.Channels.Features.DomainFeatures.Channels
{
public class Channel : AggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events
namespace Modules.Channels.Features.DomainFeatures.Channels.Events
{
public class ChannelMessagesUpdatedEvent : IDomainEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events
namespace Modules.Channels.Features.DomainFeatures.Channels.Events
{
public class MessageVotesUpdatedEvent : IDomainEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events
namespace Modules.Channels.Features.DomainFeatures.Channels.Events
{
public class TopicTriggerUpdatedEvent : IDomainEvent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain.Exceptions;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Exceptions
namespace Modules.Channels.Features.DomainFeatures.Channels.Exceptions
{
public class InvalidVoteCastException : DomainException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events;
using Modules.Channels.Features.DomainFeatures.Channels.Events;
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate
namespace Modules.Channels.Features.DomainFeatures.Channels
{
public class Message : Entity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain;

namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate
namespace Modules.Channels.Features.DomainFeatures.Channels
{
public class Reaction : Entity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate;
using Modules.Channels.Features.DomainFeatures.Channels;
using Shared.Features.EFCore;

namespace Modules.Channels.Features.Infrastructure.EFCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate;
using Modules.Channels.Features.DomainFeatures.Channels;

namespace Modules.Channels.Features.Infrastructure.EFCore.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate;
using Modules.Channels.Features.DomainFeatures.Channels;

namespace Modules.Channels.Features.Infrastructure.EFCore.Configuration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using AutoMapper;
using Shared.Features.Messaging.Query;
using Shared.Features.Messaging.Command;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands;
using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries;
using Modules.Channels.Features.DomainFeatures.Channels;
using Modules.Channels.Features.DomainFeatures.Channels.Application.Commands;
using Modules.Channels.Features.DomainFeatures.Channels.Application.Queries;
using Shared.Kernel.BuildingBlocks.Authorization.Attributes;
using Modules.Channels.Web.Shared.DTOs.ChannelAggregate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Modules.TenantIdentity.IntegrationEvents;
using Shared.Features.Messaging.IntegrationEvent;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.Aplication.IntegrationEventHandlers
namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomers.Aplication.IntegrationEventHandlers
{
public class UserUpdatedIntegrationEventHandler : IIntegrationEventHandler<UserEmailUpdatedIntegrationEvent>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Query;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.Aplication.Queries
namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomers.Aplication.Queries
{
public class GetStripeCustomer : IQuery<StripeCustomer>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Domain;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate
namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomers
{
public class StripeCustomer : AggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Command;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.Application.Commands
{
public class CreateSubscriptionForTenant : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Command;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.Application.Commands
{
public class DeleteSubscription : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Command;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.Application.Commands
{
public class UpdateSubscription : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Features.Messaging.Query;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Queries
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.Application.Queries
{
public class GetStripeCheckoutSession : IQuery<Stripe.Checkout.Session>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate;
using Modules.Subscriptions.Features.DomainFeatures.StripeCustomers;
using Shared.Features.Domain;
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;

namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions
{
public class StripeSubscription : AggregateRoot
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Shared.Kernel.BuildingBlocks.Auth.DomainKernel;

namespace Modules.Subscriptions.Features.DomainFeatures.SubscriptionAggregate
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions
{
public class StripeSubscriptionPlan
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate
namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions
{
public enum SubscriptionStatus
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.StripeCustomer", b =>
modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeCustomers.StripeCustomer", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
Expand Down Expand Up @@ -53,7 +53,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("StripeCustomers", "Subscriptions");
});

modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.StripeSubscription", b =>
modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.StripeSubscription", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
Expand Down Expand Up @@ -97,9 +97,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("StripeSubscriptions", "Subscriptions");
});

modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.StripeSubscription", b =>
modelBuilder.Entity("Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions.StripeSubscription", b =>
{
b.HasOne("Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.StripeCustomer", "StripeCustomer")
b.HasOne("Modules.Subscriptions.Features.DomainFeatures.StripeCustomers.StripeCustomer", "StripeCustomer")
.WithMany()
.HasForeignKey("StripeCustomerId")
.OnDelete(DeleteBehavior.Cascade)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate;
using Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate;
using Modules.Subscriptions.Features.DomainFeatures.StripeCustomers;
using Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptions;
using Shared.Features.EFCore;

namespace Modules.Subscriptions.Features.Infrastructure.EFCore
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;

namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate.Application.Queries
namespace Modules.TenantIdentity.Features.DomainFeatures.Tenants.Application.Queries
{
public class GetAllTenantMembershipsOfUser : IQuery<List<TenantMembership>>
{
Expand Down
Loading

0 comments on commit bc1aeae

Please sign in to comment.