# UserActivity

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

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `userId` | `String` | ✓ |  |
| `entityType` | `String` | ✓ |  |
| `entityId` | `String` | ✓ |  |
| `actionType` | `String` | ✓ |  |
| `lastAccessAt` | `DateTime` | ✓ |  |
| `accessCount` | `Int` | ✓ |  |

## Diagram

```mermaid
erDiagram
    UserActivity {
        id String [PK]
        userId String
        entityType String
        entityId String
        actionType String
        lastAccessAt DateTime
        accessCount Int
    }
    UserActivity ||--|| User : ""
```

## Relationships

- HAS_ONE → `User`

## Referenced By

- `User` (HAS_ONE)
