PhoenixKit.Modules.Comments.CommentLike (phoenix_kit v1.7.62)

Copy Markdown View Source

Schema for comment likes in the standalone Comments module.

Tracks which users have liked which comments. Enforces one like per user per comment.

Summary

Functions

Changeset for creating a comment like.

Types

t()

@type t() :: %PhoenixKit.Modules.Comments.CommentLike{
  __meta__: term(),
  comment:
    PhoenixKit.Modules.Comments.Comment.t() | Ecto.Association.NotLoaded.t(),
  comment_uuid: UUIDv7.t(),
  inserted_at: DateTime.t() | nil,
  updated_at: DateTime.t() | nil,
  user: PhoenixKit.Users.Auth.User.t() | Ecto.Association.NotLoaded.t(),
  user_uuid: UUIDv7.t() | nil,
  uuid: UUIDv7.t() | nil
}

Functions

changeset(like, attrs)

Changeset for creating a comment like.

Unique constraint on (comment_uuid, user_uuid) — one like per user per comment.