PhoenixKit. Modules. Publishing. PublishingVersion
(PhoenixKitPublishing v0.4.3)
Copy Markdown
View Source
Schema for publishing post versions.
Versions are the source of truth for published state and metadata.
Each post can have multiple versions (v1, v2, etc.). Each version contains
per-language content rows in PublishingContent.
Status Flow
draft- Version is being editedpublished- Version is live (post.active_version_uuid points here)archived- Version replaced by newer one
Data JSONB Keys
Version metadata (defaults for all languages)
featured_image_uuid- Featured image reference (media UUID)tags- List of tag stringsdescription- SEO meta descriptionallow_version_access- Whether older versions are publicly accessiblefeatured- Whether this post is featured (pinned to the top of the group listing and rendered larger). Per-group display is gated by the group's ownfeatured_enabled/featured_layoutconfig.
Version history
created_from- Source version number this was created fromnotes- Version notes/changelog
Summary
Functions
Changeset for creating or updating a publishing version.
Returns whether older versions are publicly accessible.
Returns the source version number this was created from.
Returns the SEO description.
Returns whether this post is featured (pinned + shown larger on the group listing).
Returns the featured image UUID.
Returns version notes.
Returns the post tags.
Types
@type t() :: %PhoenixKit.Modules.Publishing.PublishingVersion{ __meta__: term(), contents: term(), created_by: term(), created_by_uuid: UUIDv7.t() | nil, data: map(), inserted_at: DateTime.t() | nil, post: term(), post_uuid: UUIDv7.t(), published_at: DateTime.t() | nil, status: String.t(), updated_at: DateTime.t() | nil, uuid: UUIDv7.t() | nil, version_number: integer() }
Functions
Changeset for creating or updating a publishing version.
Returns whether older versions are publicly accessible.
Returns the source version number this was created from.
Returns the SEO description.
Returns whether this post is featured (pinned + shown larger on the group listing).
Returns the featured image UUID.
Returns version notes.
Returns the post tags.