Skip to content

Commit d59b2ac

Browse files
feature(#2): this commit introduces the new “address” class as a value object with detailed address fields
1 parent 2d071aa commit d59b2ac

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

  • Boundaries/Comanda.Orders/Source/Comanda.Orders.Domain

Boundaries/Comanda.Orders/Source/Comanda.Orders.Domain/Entities/Order.cs renamed to Boundaries/Comanda.Orders/Source/Comanda.Orders.Domain/Aggregates/Order.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ public sealed class Order : Aggregate
44
{
55
public Code Code { get; set; } = default!;
66
public Metadata Metadata { get; set; } = default!;
7+
public Address Address { get; set; } = default!;
8+
79
public Status Status { get; set; } = Status.Pending;
810
public Priority Priority { get; set; } = Priority.Normal;
911
public Fulfillment Fulfillment { get; set; } = Fulfillment.Unspecified;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace Comanda.Orders.Domain.Concepts;
2+
3+
public sealed record Address : IValueObject<Address>
4+
{
5+
public string Street { get; init; } = default!;
6+
public string Number { get; init; } = default!;
7+
public string City { get; init; } = default!;
8+
9+
public string State { get; init; } = default!;
10+
public string ZipCode { get; init; } = default!;
11+
public string Neighborhood { get; init; } = default!;
12+
13+
public string? Complement { get; init; }
14+
public string? Reference { get; init; }
15+
}

0 commit comments

Comments
 (0)