PhoenixKit.Users.AdminNote (phoenix_kit v1.7.71)

Copy Markdown View Source

Schema for admin notes about users.

Admin notes allow administrators to record internal notes about users that are only visible to other administrators. This enables admin-to-admin communication about user accounts.

Fields

  • user_uuid - The user being noted about
  • author_uuid - The admin who wrote the note
  • content - The note content
  • inserted_at - When the note was created
  • updated_at - When the note was last updated

Permissions

  • Only admins can view, create, edit, and delete notes
  • Any admin can edit or delete any note
  • Notes show author information for accountability

Summary

Functions

Creates a changeset for a new admin note.

Creates a changeset for updating an existing admin note. Only the content can be updated.

Types

t()

@type t() :: %PhoenixKit.Users.AdminNote{
  __meta__: term(),
  author: term(),
  author_uuid: UUIDv7.t() | nil,
  content: String.t(),
  inserted_at: DateTime.t(),
  updated_at: DateTime.t(),
  user: term(),
  user_uuid: UUIDv7.t() | nil,
  uuid: UUIDv7.t() | nil
}

Functions

changeset(admin_note, attrs)

Creates a changeset for a new admin note.

update_changeset(admin_note, attrs)

Creates a changeset for updating an existing admin note. Only the content can be updated.