AshCommanded.Commanded.Command (AshCommanded v0.1.0)

View Source

Represents a command in the Commanded DSL.

Commands define actions that can be performed on a resource, resulting in events.

Summary

Types

t()

@type t() :: %AshCommanded.Commanded.Command{
  action: atom() | nil,
  action_type: :create | :update | :destroy | :read | :custom | nil,
  autogenerate_handler?: boolean(),
  command_name: atom() | nil,
  context_prefix: atom() | nil,
  fields: [atom()],
  handler_name: atom() | nil,
  identity_field: atom() | nil,
  in_transaction?: boolean(),
  include_aggregate?: boolean(),
  include_command?: boolean(),
  include_metadata?: boolean(),
  middleware: [module() | {module(), map()}],
  name: atom(),
  param_mapping: map() | (map() -> map()) | (map(), struct() -> map()) | nil,
  repo: atom() | nil,
  static_context: map() | nil,
  transaction_isolation_level:
    :read_committed | :repeatable_read | :serializable | nil,
  transaction_timeout: integer() | nil,
  transforms: [tuple()],
  validations: [tuple()]
}