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

Copy Markdown View Source

Schema for comment dislikes in the standalone Comments module.

Tracks which users have disliked which comments. Enforces one dislike per user per comment.

Summary

Functions

Changeset for creating a comment dislike.

Types

t()

@type t() :: %PhoenixKit.Modules.Comments.CommentDislike{
  __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(dislike, attrs)

Changeset for creating a comment dislike.

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