Junction schema for post-group assignments.
Many-to-many relationship between posts and groups. A post can be in multiple groups, and a group can contain multiple posts. Position allows manual ordering within each group.
Fields
post_uuid- Reference to the postgroup_uuid- Reference to the groupposition- Display order within the group (0, 1, 2, etc.)
Examples
# First post in group
%PostGroupAssignment{
post_uuid: "018e3c4a-9f6b-7890-abcd-ef1234567890",
group_uuid: "018e3c4a-1234-5678-abcd-ef1234567890",
position: 0
}
# Second post in group
%PostGroupAssignment{
post_uuid: "018e3c4a-5678-1234-abcd-ef1234567890",
group_uuid: "018e3c4a-1234-5678-abcd-ef1234567890",
position: 1
}
Summary
Functions
Changeset for creating a post-group assignment.
Types
@type t() :: %PhoenixKit.Modules.Posts.PostGroupAssignment{ __meta__: term(), group: PhoenixKit.Modules.Posts.PostGroup.t() | Ecto.Association.NotLoaded.t(), group_uuid: UUIDv7.t(), inserted_at: DateTime.t() | nil, position: integer(), post: PhoenixKit.Modules.Posts.Post.t() | Ecto.Association.NotLoaded.t(), post_uuid: UUIDv7.t(), updated_at: DateTime.t() | nil }