# `DDD.DomainEvent`
[🔗](https://github.com/blackuprise/vicander/blob/v0.1.1/lib/ddd/events/domain_event.ex#L1)

Behaviour and macros for Domain Events.

Domain Events represent meaningful things that happened in the domain.
Named in past tense, they carry all data needed to understand the occurrence.

## Usage

    defmodule MyApp.Events.OrderPlaced do
      use DDD.DomainEvent

      domain_event do
        field :order_id,    :string
        field :customer_id, :string
      end
    end

    event = MyApp.Events.OrderPlaced.new(%{order_id: "123", customer_id: "c1"})

# `event_name`

```elixir
@callback event_name() :: String.t()
```

# `domain_event`
*macro* 

# `field`
*macro* 

---

*Consult [api-reference.md](api-reference.md) for complete listing*
