# Asset

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `filename` | `String` | ✓ |  |
| `originalFilename` | `String` | ✓ |  |
| `mimeType` | `String` | ✓ |  |
| `size` | `Int` | ✓ |  |
| `width` | `Int` | - |  |
| `height` | `Int` | - |  |
| `storageProvider` | `String` | ✓ |  |
| `storagePath` | `String` | ✓ |  |
| `url` | `String` | ✓ |  |
| `cdnUrl` | `String` | - |  |
| `audienceIds` | `String[]` | ✓ |  |
| `isPublic` | `Boolean` | ✓ |  |
| `altText` | `String` | - |  |
| `caption` | `String` | - |  |
| `tags` | `String[]` | ✓ |  |
| `organizationId` | `String` | ✓ |  |
| `uploadedBy` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |
| `screenshots` | `Screenshot[]` | ✓ |  |
| `screenshotVersions` | `ScreenshotVersion[]` | ✓ |  |

## Diagram

```mermaid
erDiagram
    Asset {
        id String [PK]
        filename String
        originalFilename String
        mimeType String
        size Int
        width Int?
        height Int?
        storageProvider String
        storagePath String
        url String
        cdnUrl String?
        audienceIds String[]
        isPublic Boolean
        altText String?
        caption String?
        tags String[]
        organizationId String
        uploadedBy String
        createdAt DateTime
        updatedAt DateTime
        screenshots Screenshot[]
        screenshotVersions ScreenshotVersion[]
    }
    Asset ||--}o ScreenshotComparison : ""
```

## Relationships

- HAS_ONE → `ScreenshotComparison`

## Referenced By

- `Screenshot` (HAS_ONE)
- `ScreenshotVersion` (HAS_ONE)
- `ScreenshotComparison` (HAS_ONE)
