# `PhoenixKitDocumentCreator.Schemas.Template`
[🔗](https://github.com/BeamLabEU/phoenix_kit_document_creator/blob/0.4.0/lib/phoenix_kit_document_creator/schemas/template.ex#L1)

Schema for document templates.

Templates are now managed as Google Docs in Google Drive. The `google_doc_id`
field links a template record to its Google Doc. Variables use `{{ placeholder }}`
syntax and are substituted via the Google Docs API.

Note: Several fields (`content_html`, `content_css`, `content_native`, header/footer
associations) are retained for database compatibility but are no longer used in the
Google Docs workflow. A future migration should remove these columns.

# `t`

```elixir
@type t() :: %PhoenixKitDocumentCreator.Schemas.Template{
  __meta__: term(),
  category: term(),
  config: term(),
  content_css: term(),
  content_html: term(),
  content_native: term(),
  created_by_uuid: term(),
  data: term(),
  description: term(),
  folder_id: term(),
  footer: term(),
  footer_uuid: term(),
  google_doc_id: term(),
  header: term(),
  header_uuid: term(),
  inserted_at: term(),
  language: term(),
  name: term(),
  path: term(),
  slug: term(),
  status: term(),
  thumbnail: term(),
  updated_at: term(),
  uuid: term(),
  variables: term()
}
```

# `changeset`

# `language_changeset`

Focused changeset for setting/clearing the locale tag on a template.

Used by both the create-time language stamp (`Documents.create_template/2`)
and the post-create updater (`Documents.update_template_language/3`) so
both write paths honour `validate_length(:language, max: 10)` — the prior
`update_all` write skipped this and would surface oversized codes as a
Postgrex `value too long` exception instead of a clean changeset error.

# `sync_changeset`

Changeset for upserting from Google Drive sync data.

---

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