# Notification

**Kind:** Database Model

**Source:** [`atloria-monorepo/libs/database/prisma/schema.prisma`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/database/prisma/schema.prisma#L825)

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `userId` | `String` | ✓ |  |
| `type` | `NotificationType` | ✓ |  |
| `title` | `String` | ✓ |  |
| `message` | `String` | ✓ |  |
| `entityType` | `String` | - |  |
| `entityId` | `String` | - |  |
| `metadata` | `Json` | - |  |
| `read` | `Boolean` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `readAt` | `DateTime` | - |  |

## Diagram

```mermaid
erDiagram
    Notification {
        id String [PK]
        userId String
        type NotificationType
        title String
        message String
        entityType String?
        entityId String?
        metadata Json?
        read Boolean
        createdAt DateTime
        readAt DateTime?
    }
```
