Current section
Files
Jump to
Current section
Files
lib/nombaone/event_catalog.ex
defmodule Nombaone.EventCatalogEntry do
@moduledoc """
One entry in the event catalog: `when` the event fires and which `data` keys
(`payload`) it carries.
Because `when` is a reserved word, prefer `Map.fetch!(entry, :when)` if
`entry.when` reads awkwardly in your code.
"""
use Nombaone.Model, fields: [:when, :payload]
end