# `PhoenixKit.Mentions.Mention`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v2.13.7/lib/phoenix_kit/mentions/mention.ex#L1)

One `@` ping or `#` record link, indexed.

The canonical mention is the token inside the text — see
`PhoenixKit.Mentions.Token` for why. This row is a rebuilt-on-save cache
of the current head of one field, and exists to answer two questions the
text cannot answer cheaply:

  * **what links here** — every record pointing at this one, without
    scanning every body in every module;
  * **what is new** — so re-saving a comment doesn't re-notify everyone
    already mentioned in it.

Neither side carries a foreign key: both point into ~28 optional
packages' tables. `actor_uuid` does, because users are core's.

# `t`

```elixir
@type t() :: %PhoenixKit.Mentions.Mention{
  __meta__: term(),
  actor_uuid: UUIDv7.t() | nil,
  inserted_at: DateTime.t() | nil,
  kind: String.t() | nil,
  label: String.t() | nil,
  notified_at: DateTime.t() | nil,
  source_field: String.t() | nil,
  source_type: String.t() | nil,
  source_uuid: UUIDv7.t() | nil,
  target_type: String.t() | nil,
  target_uuid: UUIDv7.t() | nil,
  uuid: UUIDv7.t() | nil
}
```

# `changeset`

```elixir
@spec changeset(t(), map()) :: Ecto.Changeset.t()
```

# `kinds`

```elixir
@spec kinds() :: [String.t()]
```

The two mention kinds: an `@` ping and a `#` record link.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
