# OrganizationCredit

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `organizationId` | `String` | ✓ | unique |
| `balance` | `Int` | ✓ |  |
| `totalPurchased` | `Int` | ✓ |  |
| `totalSpent` | `Int` | ✓ |  |
| `monthlyLimit` | `Int` | - |  |
| `alertThreshold` | `Int` | - |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    OrganizationCredit {
        id String [PK]
        organizationId String [UNIQUE]
        balance Int
        totalPurchased Int
        totalSpent Int
        monthlyLimit Int?
        alertThreshold Int?
        createdAt DateTime
        updatedAt DateTime
    }
```
