# DocumentationJob

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `configId` | `String` | ✓ |  |
| `status` | `DocumentationJobStatus` | ✓ |  |
| `progress` | `Int` | ✓ |  |
| `currentStage` | `String` | - |  |
| `stageProgress` | `Int` | ✓ |  |
| `currentItem` | `String` | - |  |
| `documentsCreated` | `Int` | ✓ |  |
| `documentsUpdated` | `Int` | ✓ |  |
| `categoriesCreated` | `Int` | ✓ |  |
| `screenshotsCaptured` | `Int` | ✓ |  |
| `commitHash` | `String` | - |  |
| `branch` | `String` | - |  |
| `routeMappings` | `Json` | - |  |
| `error` | `String` | - |  |
| `errorStack` | `String` | - |  |
| `errorStage` | `String` | - |  |
| `durationMs` | `Int` | - |  |
| `metrics` | `Json` | - |  |

## Diagram

```mermaid
erDiagram
    DocumentationJob {
        id String [PK]
        projectId String
        configId String
        status DocumentationJobStatus
        progress Int
        currentStage String?
        stageProgress Int
        currentItem String?
        documentsCreated Int
        documentsUpdated Int
        categoriesCreated Int
        screenshotsCaptured Int
        commitHash String?
        branch String?
        routeMappings Json?
        error String?
        errorStack String?
        errorStage String?
        durationMs Int?
        metrics Json?
    }
```

## Referenced By

- `DocGenerationRun` (HAS_ONE)
