# Screenshot

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `url` | `String` | ✓ |  |
| `title` | `String` | - |  |
| `description` | `String` | - |  |
| `viewport` | `String` | ✓ |  |
| `browser` | `String` | ✓ |  |
| `deviceType` | `String` | ✓ |  |
| `width` | `Int` | ✓ |  |
| `height` | `Int` | ✓ |  |
| `assetId` | `String` | ✓ |  |
| `version` | `Int` | ✓ |  |
| `isBaseline` | `Boolean` | ✓ |  |
| `baselineVersion` | `Int` | - |  |
| `flowStepId` | `String` | - |  |
| `stateType` | `String` | - |  |
| `featureArea` | `String` | - |  |
| `pageType` | `String` | - |  |
| `semanticTags` | `String[]` | ✓ |  |
| `recoveryAttempts` | `Int` | ✓ |  |
| `recoverySucceeded` | `Boolean` | ✓ |  |
| `successfulSelector` | `String` | - |  |
| `jobId` | `String` | - |  |
| `organizationId` | `String` | ✓ |  |
| `capturedBy` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |
| `versions` | `ScreenshotVersion[]` | ✓ |  |

## Diagram

```mermaid
erDiagram
    Screenshot {
        id String [PK]
        projectId String
        url String
        title String?
        description String?
        viewport String
        browser String
        deviceType String
        width Int
        height Int
        assetId String
        version Int
        isBaseline Boolean
        baselineVersion Int?
        flowStepId String?
        stateType String?
        featureArea String?
        pageType String?
        semanticTags String[]
        recoveryAttempts Int
        recoverySucceeded Boolean
        successfulSelector String?
        jobId String?
        organizationId String
        capturedBy String
        createdAt DateTime
        updatedAt DateTime
        versions ScreenshotVersion[]
    }
    Screenshot ||--|| Project : ""
    Screenshot ||--|| Asset : ""
    Screenshot ||--|| ScreenshotJob : ""
    Screenshot ||--|| Organization : ""
    Screenshot ||--|| User : ""
    Screenshot ||--}o ScreenshotComparison : ""
    Screenshot ||--}o ScreenshotComparison : ""
```

## Relationships

- HAS_ONE → `Project`
- HAS_ONE → `Asset`
- HAS_ONE → `ScreenshotJob`
- HAS_ONE → `Organization`
- HAS_ONE → `User`
- HAS_ONE → `ScreenshotComparison`
- HAS_ONE → `ScreenshotComparison`

## Referenced By

- `User` (HAS_ONE)
- `ScreenshotVersion` (HAS_ONE)
- `ScreenshotComparison` (HAS_ONE)
- `ScreenshotComparison` (HAS_ONE)
