# DocSearchQuery

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `docVersionId` | `String` | - |  |
| `query` | `String` | ✓ |  |
| `resultsCount` | `Int` | ✓ |  |
| `clickedDocId` | `String` | - |  |
| `sessionId` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    DocSearchQuery {
        id String [PK]
        projectId String
        docVersionId String?
        query String
        resultsCount Int
        clickedDocId String?
        sessionId String
        createdAt DateTime
    }
    DocSearchQuery ||--|| Project : ""
```

## Relationships

- HAS_ONE → `Project`
