# User

**Kind:** Database Model

**Source:** [`atloria-monorepo/apps/database-parser/test/fixtures/sample.prisma`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/database-parser/test/fixtures/sample.prisma#L13)

User model represents application users

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `String` | ✓ | PK |
| `email` | `String` | ✓ | unique |
| `name` | `String` | - |  |
| `password` | `String` | ✓ |  |
| `role` | `Role` | ✓ |  |
| `createdAt` | `DateTime` | ✓ |  |
| `updatedAt` | `DateTime` | ✓ |  |

## Diagram

```mermaid
erDiagram
    User {
        id String [PK]
        email String [UNIQUE]
        name String?
        password String
        role Role
        createdAt DateTime
        updatedAt DateTime
    }
    User ||--}o Post : ""
    User ||--|| Profile : ""
```

## Relationships

- HAS_MANY → `Post`
- HAS_ONE → `Profile`

## Referenced By

- `Post` (BELONGS_TO)
- `Profile` (BELONGS_TO)
