Current section

Files

Jump to
commanded test commands support identity identity_function_aggregate.ex
Raw

test/commands/support/identity/identity_function_aggregate.ex

defmodule Commanded.Commands.IdentityFunctionAggregate do
@moduledoc false
defstruct [uuid: nil]
defmodule IdentityFunctionCommand, do: defstruct [:uuid]
defmodule IdentityFunctionEvent, do: defstruct [:uuid]
def execute(%__MODULE__{}, %IdentityFunctionCommand{uuid: uuid}), do: %IdentityFunctionEvent{uuid: uuid}
def apply(aggregate, _event), do: aggregate
end