Table of Contents

Struct ProductMetadata

Namespace
arolariu.Backend.Domain.Invoices.DDD.ValueObjects.Products
Assembly
arolariu.Backend.Domain.Invoices.dll

Operational metadata flags describing mutable processing / workflow state for a product line item.

[ExcludeFromCodeCoverage]
public record struct ProductMetadata : IEquatable<ProductMetadata>
Implements
Inherited Members

Remarks

Scope: These flags are owned by the parent product and persisted inline (embedded) in the invoice document.

Semantics:

  • IsEdited: User (or automated enrichment) has modified one or more product fields after initial ingestion.
  • IsComplete: Product line considered finalized (sufficient data quality for analytics / export).
  • IsSoftDeleted: Product logically removed but retained for audit; parent invoice filters these at presentation layers.

Thread-safety: Not thread-safe; modifications must occur within aggregate mutation workflow.

Properties

IsComplete

Signals that required enrichment / validation steps have completed for this product.

public bool IsComplete { readonly get; set; }

Property Value

bool

Remarks

Downstream analytics may exclude products where this flag is false to avoid skew.

IsEdited

Indicates the product has been user- or system-modified post-ingestion.

public bool IsEdited { readonly get; set; }

Property Value

bool

Remarks

Used to surface UI indicators and enable differential audit logging.

IsSoftDeleted

Logical deletion marker (soft delete) retaining historical context.

public bool IsSoftDeleted { readonly get; set; }

Property Value

bool

Remarks

Soft-deleted products remain persisted; aggregate-level queries are expected to exclude them unless explicitly overridden.