PhoenixKitDocumentCreator.Schemas.Document (PhoenixKitDocumentCreator v0.2.6)

Copy Markdown View Source

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.

Summary

Functions

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

Changeset for upserting from Google Drive sync data.

Types

t()

@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()
}

Functions

changeset(document, attrs)

creation_changeset(document, attrs)

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

sync_changeset(document, attrs)

Changeset for upserting from Google Drive sync data.