# User

**Kind:** Database Model

**Source:** [`atloria-monorepo/apps/database-parser/test/fixtures/user.entity.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/database-parser/test/fixtures/user.entity.ts#L36)

User entity represents application users

## Fields

| Field | Type | Required | Key |
|---|---|---|---|
| `id` | `uuid` | ✓ | PK |
| `email` | `varchar` | ✓ | unique |
| `name` | `varchar` | - |  |
| `password` | `varchar` | ✓ |  |
| `role` | `enum` | ✓ |  |
| `createdAt` | `timestamp` | ✓ |  |
| `updatedAt` | `timestamp` | ✓ |  |

## Diagram

```mermaid
erDiagram
    User {
        id uuid [PK, AUTO]
        email varchar [UNIQUE]
        name varchar?
        password varchar
        role enum
        createdAt timestamp
        updatedAt timestamp
    }
    User ||--}o Post : ""
    User ||--|| Profile : ""
```

## Relationships

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

## Referenced By

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