# DocVersion

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `organizationId` | `String` | ✓ |  |
| `versionNumber` | `Int` | ✓ |  |
| `label` | `String` | - |  |
| `description` | `String` | - |  |
| `language` | `String` | ✓ |  |
| `audienceScope` | `String` | ✓ |  |
| `status` | `DocVersionStatus` | ✓ |  |
| `commitHash` | `String` | - |  |
| `branch` | `String` | - |  |
| `gitTag` | `String` | - |  |
| `jobId` | `String` | - | unique |
| `generationSummary` | `Json` | - |  |
| `screenBaseline` | `Json` | - |  |
| `previousVersionId` | `String` | - |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |
| `publishedAt` | `DateTime` | - |  |
| `archivedAt` | `DateTime` | - |  |
| `scheduledActivateAt` | `DateTime` | - |  |
| `scheduledById` | `String` | - |  |
| `scheduleTimezone` | `String` | - |  |

## Diagram

```mermaid
erDiagram
    DocVersion {
        id String [PK]
        projectId String
        organizationId String
        versionNumber Int
        label String?
        description String?
        language String
        audienceScope String
        status DocVersionStatus
        commitHash String?
        branch String?
        gitTag String?
        jobId String? [UNIQUE]
        generationSummary Json?
        screenBaseline Json?
        previousVersionId String?
        createdAt DateTime
        updatedAt DateTime
        publishedAt DateTime?
        archivedAt DateTime?
        scheduledActivateAt DateTime?
        scheduledById String?
        scheduleTimezone String?
    }
```

## Referenced By

- `User` (HAS_ONE)
- `Category` (HAS_ONE)
- `DocVersionAccess` (HAS_ONE)
- `DocVersionApproval` (HAS_ONE)
