# DocVersionAccess

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `docVersionId` | `String` | ✓ | unique |
| `accessType` | `DocVersionAccessType` | ✓ |  |
| `allowedUserIds` | `String[]` | ✓ |  |
| `allowedDomains` | `String[]` | ✓ |  |
| `requirePassword` | `Boolean` | ✓ |  |
| `password` | `String` | - |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    DocVersionAccess {
        id String [PK]
        docVersionId String [UNIQUE]
        accessType DocVersionAccessType
        allowedUserIds String[]
        allowedDomains String[]
        requirePassword Boolean
        password String?
        createdAt DateTime
        updatedAt DateTime
    }
    DocVersionAccess ||--|| DocVersion : ""
```

## Relationships

- HAS_ONE → `DocVersion`
