mix dialup.gen.aggregate (Dialup v0.2.0)

Copy Markdown View Source

Generates Commanded aggregate scaffolding for a Dialup application.

mix dialup.gen.aggregate ContextName AggregateName table_name \
    command1:field1:type,field2:type \
    command2

Examples

mix dialup.gen.aggregate Ordering Order orders \
    add_item:product_id:string,qty:integer,price:integer \
    confirm

Options

  • --app — OTP application name (defaults to Mix.Project app)
  • --force — overwrite existing files (except commanded_app.ex, which is always skipped)

Summary

Functions

derive_event_name(command_name)

ecto_type(type)

migration_type(type)

parse_command(spec)

parse_field(spec)

past_tense(verb)