# DocPageView

**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#L2373)

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `docVersionId` | `String` | - |  |
| `documentId` | `String` | - |  |
| `documentSlug` | `String` | ✓ |  |
| `sessionId` | `String` | ✓ |  |
| `referrer` | `String` | - |  |
| `referrerSource` | `String` | - |  |
| `userAgent` | `String` | - |  |
| `device` | `String` | - |  |
| `country` | `String` | - |  |
| `timeOnPage` | `Int` | - |  |
| `scrollDepth` | `Int` | - |  |
| `createdAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    DocPageView {
        id String [PK]
        projectId String
        docVersionId String?
        documentId String?
        documentSlug String
        sessionId String
        referrer String?
        referrerSource String?
        userAgent String?
        device String?
        country String?
        timeOnPage Int?
        scrollDepth Int?
        createdAt DateTime
    }
    DocPageView ||--|| Project : ""
```

## Relationships

- HAS_ONE → `Project`
