Files
explicit-mapping/src/Domain/Order.cs
T
2026-09-17 18:54:53 +01:00

18 lines
794 B
C#

namespace Domain;
/// <summary>A plain domain order: no persistence base class, no persistence context knowledge.</summary>
public class Order
{
/// <summary>Identity: <see cref="Guid.Empty"/> until the persistence layer assigns one on save.</summary>
public Guid Id { get; set; }
/// <summary>Free-text description of what this order is for.</summary>
public string Description { get; set; } = string.Empty;
/// <summary>Order total as a value object; the DTO and storage row stay plain ints — the mappers convert.</summary>
public OrderMoney TotalInCents { get; set; } = OrderMoney.Default;
/// <summary>The owning client; wired by navigation fix-up when the order is added to <see cref="Client.Orders"/>.</summary>
public Client? Client { get; set; }
}