PhoenixKitDocumentCreator.Schemas.Template (PhoenixKitDocumentCreator v0.2.8)

Copy Markdown View Source

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.

Summary

Functions

Changeset for upserting from Google Drive sync data.

Types

t()

@type t() :: %PhoenixKitDocumentCreator.Schemas.Template{
  __meta__: 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(),
  name: term(),
  path: term(),
  slug: term(),
  status: term(),
  thumbnail: term(),
  updated_at: term(),
  uuid: term(),
  variables: term()
}

Functions

changeset(template, attrs)

sync_changeset(template, attrs)

Changeset for upserting from Google Drive sync data.