Skip to content

Commit

Permalink
♻️ Make the Domain more intentional (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hona authored Mar 23, 2024
1 parent 51a7b9d commit 103c160
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VerticalSliceArchitectureTemplate.Common.Models;
namespace VerticalSliceArchitectureTemplate.Common.Domain;

public abstract class BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore.Diagnostics;
using VerticalSliceArchitectureTemplate.Common.Domain;

namespace VerticalSliceArchitectureTemplate.Common.Persistence;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Commands;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Commands;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Commands;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Commands;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace VerticalSliceArchitectureTemplate.Features.Todos.Domain.Events;

public record TodoCompletedEvent(Guid TodoId) : INotification;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace VerticalSliceArchitectureTemplate.Features.Todos.Domain.Events;

public record TodoCreatedEvent(Guid TodoId) : INotification;
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.ComponentModel.DataAnnotations;
using VerticalSliceArchitectureTemplate.Features.Todos.Events;
using VerticalSliceArchitectureTemplate.Common.Domain;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain.Events;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Models;
namespace VerticalSliceArchitectureTemplate.Features.Todos.Domain;

public class Todo : BaseEntity
{
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

// Disable as we want the partial class to be in the same namespace as the original class
// ReSharper disable once CheckNamespace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Persistence;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Immutable;
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Queries;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;

namespace VerticalSliceArchitectureTemplate.Features.Todos.Queries;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Immutable;
using VerticalSliceArchitectureTemplate.Features.Todos.Commands;
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;
using VerticalSliceArchitectureTemplate.Features.Todos.Queries;

namespace VerticalSliceArchitectureTemplate.Features.Todos.WebApi;
Expand Down
1 change: 0 additions & 1 deletion src/VerticalSliceArchitectureTemplate/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
global using Microsoft.EntityFrameworkCore;
global using VerticalSliceArchitectureTemplate.Common.Exceptions;
global using VerticalSliceArchitectureTemplate.Common.Features;
global using VerticalSliceArchitectureTemplate.Common.Models;
global using VerticalSliceArchitectureTemplate.Common.Persistence;
global using MediatR;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using FluentAssertions;
using VerticalSliceArchitectureTemplate.Features.Todos.Events;
using VerticalSliceArchitectureTemplate.Features.Todos.Models;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain;
using VerticalSliceArchitectureTemplate.Features.Todos.Domain.Events;

namespace VerticalSliceArchitectureTemplate.Unit.Tests.Features.Todos.Models;

Expand Down

0 comments on commit 103c160

Please sign in to comment.