AttrEngine.Schema.AttributeSet (attr_engine v0.2.0)

Copy Markdown View Source

Named group of attributes — a reusable content shape.

An AttributeSet groups Attributes via the ASA join table, forming a "schema" for a block, piece, entity, or form. It carries its own ui_config (container-level presentation) and data_config.

Composition

AttributeSets can form DAG hierarchies via AttrEngine.Schema.AttributeSetTree:

  • includes — composition, child attributes added to parent
  • extends — inheritance, child specialises parent
  • overrides — explicit override of specific attributes

Typing

AttributeSets can be classified by Types via AttrEngine.Schema.AttributeSetTypeAssociation, allowing the same system to distinguish "CMS block", "entity schema", "piece", etc.

Multilingual

The translations field holds JSONB maps for translatable metadata: %{"name" => %{"en" => "Hero Banner", "el" => "Κεντρικό Banner"}}

Summary

Functions

Standard changeset with easy_mode support.

Functions

changeset(attribute_set, attrs, opts \\ [])

Standard changeset with easy_mode support.