PhoenixKitDocumentCreator.Schemas.TemplatePreset (PhoenixKitDocumentCreator v0.4.0)

Copy Markdown View Source

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.

Presets are optionally scoped via scope_type + scope_id (e.g. "organization" + org uuid) and optionally categorized for UI grouping.

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 (Task 7+).

Summary

Types

t()

@type t() :: %PhoenixKitDocumentCreator.Schemas.TemplatePreset{
  __meta__: term(),
  category: 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()
}

Functions

changeset(preset, attrs)