Caravela.Gen.EctoSchema (Caravela v0.13.1)

Copy Markdown View Source

Generates one Ecto schema module per entity from a compiled Caravela.Schema.Domain.

Returns a list of {path, source} tuples. Caravela.Gen or the Mix task is responsible for actually writing the files. Files preserve content below the # --- CUSTOM --- marker on regeneration.

Summary

Functions

Render every entity in the domain as an Ecto schema file.

Functions

render_all(domain, opts \\ [])

Render every entity in the domain as an Ecto schema file.

render_entity(domain, entity, opts \\ [])

Render a single entity.