# `PhoenixKitDocumentCreator.Schemas.TemplatePreset`
[🔗](https://github.com/BeamLabEU/phoenix_kit_document_creator/blob/0.4.8/lib/phoenix_kit_document_creator/schemas/template_preset.ex#L1)

Schema for named, reusable template compositions.

A preset captures an ordered list of section descriptors (template uuid,
position, variable defaults, image params) that can be applied to a new
document to produce a multi-section composition in one step.

## Scope convention (Stage 1, no migration)

Presets are associated with the document taxonomy by repurposing the
generic scope pair:

  * `scope_id`   — owning Category uuid (always set for managed presets)
  * `scope_type` — owning Type uuid, or `nil` for category-wide presets

A future migration will replace this with real `category_uuid` /
`type_uuid` foreign keys (see the design spec).

The `sections` field is a JSONB array where each element is a map
describing one section (keys: `template_uuid`, `position`,
`variable_values`, `image_params`). Image substitution is restricted to
PNG, JPEG, and GIF formats; enforcement happens at the context layer.

# `t`

```elixir
@type t() :: %PhoenixKitDocumentCreator.Schemas.TemplatePreset{
  __meta__: term(),
  created_by_uuid: term(),
  description: term(),
  inserted_at: term(),
  name: term(),
  scope_id: term(),
  scope_type: term(),
  sections: term(),
  updated_at: term(),
  uuid: term()
}
```

# `changeset`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
