View Source OnePiece.Commanded.Entity (OnePiece.Commanded v0.15.0)
Defines "Entity" modules.
Link to this section Summary
Types
The identity of an entity.
Functions
Converts the module into an Ecto.Schema
.
Link to this section Types
@type identity() :: String.t()
The identity of an entity.
Link to this section Functions
Converts the module into an Ecto.Schema
.
It derives from Jason.Encoder
and also adds some factory functions to create
structs.
usage
Usage
defmodule MyEntity do
use OnePiece.Commanded.Entity, identifier: :id
embedded_schema do
# ...
end
end