# ScheduledReport

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `projectId` | `String` | ✓ |  |
| `name` | `String` | ✓ |  |
| `description` | `String` | - |  |
| `cron` | `String` | ✓ |  |
| `timezone` | `String` | ✓ |  |
| `format` | `ReportFormat` | ✓ |  |
| `period` | `Int` | ✓ |  |
| `sections` | `String[]` | ✓ |  |
| `recipientEmails` | `String[]` | ✓ |  |
| `enabled` | `Boolean` | ✓ |  |
| `lastRunAt` | `DateTime` | - |  |
| `lastStatus` | `String` | - |  |
| `createdById` | `String` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    ScheduledReport {
        id String [PK]
        projectId String
        name String
        description String?
        cron String
        timezone String
        format ReportFormat
        period Int
        sections String[]
        recipientEmails String[]
        enabled Boolean
        lastRunAt DateTime?
        lastStatus String?
        createdById String
        createdAt DateTime
        updatedAt DateTime
    }
    ScheduledReport ||--|| Project : ""
```

## Relationships

- HAS_ONE → `Project`
