# `PhoenixKitDocumentCreator.Schemas.Document`
[🔗](https://github.com/BeamLabEU/phoenix_kit_document_creator/blob/0.2.7/lib/phoenix_kit_document_creator/schemas/document.ex#L1)

Schema for documents created from templates or from scratch.

Documents are now managed as Google Docs in Google Drive. The `google_doc_id`
field links a document record to its Google Doc. Creating a document from a
template copies the Google Doc and substitutes `{{ variables }}` via the API.

Note: Several fields (`content_html`, `content_css`, `content_native`,
`header_html/css/height`, `footer_html/css/height`) 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.Document{
  __meta__: term(),
  config: term(),
  content_css: term(),
  content_html: term(),
  content_native: term(),
  created_by_uuid: term(),
  data: term(),
  folder_id: term(),
  footer_css: term(),
  footer_height: term(),
  footer_html: term(),
  google_doc_id: term(),
  header_css: term(),
  header_height: term(),
  header_html: term(),
  inserted_at: term(),
  name: term(),
  path: term(),
  status: term(),
  template: term(),
  template_uuid: term(),
  thumbnail: term(),
  updated_at: term(),
  uuid: term(),
  variable_values: term()
}
```

# `changeset`

# `creation_changeset`

Changeset for creating a document from a template with variable values.

# `sync_changeset`

Changeset for upserting from Google Drive sync data.

---

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