# `Gamend.Notifications.Notification`
[🔗](https://github.com/appsinacup/gamend/blob/v1.0.7/lib/gamend/notifications/notification.ex#L1)

Ecto schema representing a notification sent from one user to another.

Notifications are persisted in the database and remain until the recipient
explicitly deletes them. Fields:

- `sender_id` – the user who sent the notification (must be a friend)
- `recipient_id` – the user who receives the notification
- `title` – required short summary
- `content` – optional longer body text
- `metadata` – optional arbitrary key/value map
- `icon_url` – optional icon; `nil` means clients show their default
  notification icon

# `t`

```elixir
@type t() :: %Gamend.Notifications.Notification{
  __meta__: term(),
  content: String.t() | nil,
  icon_url: String.t() | nil,
  id: Ecto.UUID.t() | nil,
  inserted_at: DateTime.t() | nil,
  metadata: map(),
  read: boolean(),
  recipient: term(),
  recipient_id: Ecto.UUID.t() | nil,
  sender: term(),
  sender_id: Ecto.UUID.t() | nil,
  title: String.t() | nil,
  updated_at: term()
}
```

A notification record.

---

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