# ScreenshotJob

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `urls` | `String[]` | ✓ |  |
| `viewport` | `String` | ✓ |  |
| `browser` | `String` | ✓ |  |
| `status` | `String` | ✓ |  |
| `progress` | `Int` | ✓ |  |
| `totalUrls` | `Int` | ✓ |  |
| `capturedUrls` | `Int` | ✓ |  |
| `failedUrls` | `Int` | ✓ |  |
| `error` | `String` | - |  |
| `screenshots` | `Screenshot[]` | ✓ |  |
| `name` | `String` | - |  |
| `description` | `String` | - |  |
| `authConfig` | `Json` | - |  |
| `batchConfig` | `Json` | - |  |
| `itemsMetadata` | `Json[]` | ✓ |  |
| `currentStage` | `String` | - |  |
| `currentItem` | `String` | - |  |
| `stageProgress` | `Int` | ✓ |  |
| `organizationId` | `String` | ✓ |  |
| `triggeredBy` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |
| `completedAt` | `DateTime` | - |  |

## Diagram

```mermaid
erDiagram
    ScreenshotJob {
        id String [PK]
        projectId String
        urls String[]
        viewport String
        browser String
        status String
        progress Int
        totalUrls Int
        capturedUrls Int
        failedUrls Int
        error String?
        screenshots Screenshot[]
        name String?
        description String?
        authConfig Json?
        batchConfig Json?
        itemsMetadata Json[]
        currentStage String?
        currentItem String?
        stageProgress Int
        organizationId String
        triggeredBy String
        createdAt DateTime
        updatedAt DateTime
        completedAt DateTime?
    }
    ScreenshotJob ||--|| Project : ""
    ScreenshotJob ||--|| Organization : ""
    ScreenshotJob ||--|| User : ""
```

## Relationships

- HAS_ONE → `Project`
- HAS_ONE → `Organization`
- HAS_ONE → `User`

## Referenced By

- `User` (HAS_ONE)
- `Screenshot` (HAS_ONE)
