OnePiece.Commanded.ValueObject (OnePiece.Commanded v0.4.1) View Source

Defines a module as a "Value Object". For more information about value objects, please read the following:

Link to this section Summary

Functions

Converts the module into an Ecto.Schema, and derive from Jason.Encoder.

Link to this section Functions

Link to this macro

__using__(opts \\ [])

View Source (macro)

Specs

__using__(opts :: []) :: any()

Converts the module into an Ecto.Schema, and derive from Jason.Encoder.

Usage

defmodule MyValueObject do
  use OnePiece.Commanded.ValueObject

  embedded_schema do
    # ...
  end
end