A domain event, declared on its struct:
@derive {Datumo.Event,
type: "PlotRegistered",
tags: [:plot_id, :owner_id, region: [:address, "regionId"]]}
defstruct [:plot_id, :owner_id, :address, :registered_at]typeis the event's title on the board, verbatim. It is what the store keeps and what other slices match on, so it never comes from the module name: renaming a module must not rename a fact.tagsare the board's fields withidAttribute: trueortag: true.:plot_idgives"plot:<value>". A subfield goes by its path:region: [:address, "regionId"]gives"region:<value>". Through a list, one tag per element:lot: [:lots, :lot_id]. A nil value gives no tag.
to_event/1 returns %{type:, data:, tags:}, the shape FACT and UmaDB both
store.
Summary
Types
@type t() :: term()
All the types that implement this protocol.