> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corebanq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standard Objects

> Overview of core entities in the CoreBanq system

This section provides an overview of the core entities in the system and their relationships.

## Core Entities

### Users

Users represent individuals who interact with CoreBanq. Key characteristics:

* Can be associated with multiple customers
* Have role-based access rights
* Link to personal data through personas
* Support multiple authentication methods

### Credentials

Authentication methods associated with users:

| Type     | Description                  | Usage    |
| -------- | ---------------------------- | -------- |
| Email    | Primary email address        | Required |
| Phone    | Mobile number                | Optional |
| TOTP     | Time-based One-Time Password | Optional |
| Telegram | Telegram account             | Optional |
| WhatsApp | WhatsApp number              | Optional |

<Note>
  When a second credential is verified, 2FA is automatically activated for the user.
</Note>

### Customers

Represent organizations in the system:

* Private individuals
* Companies
* Organizations
* Financial institutions

### Personas

Store personal information separately:

* Identity details
* Contact information
* Document records
* Enhanced privacy controls

### Persona Links

Connect personas to other entities:

* User → Persona (personal data)
* Customer → Persona (stakeholder data)
* Shareholder → Persona (ownership data)

## Entity Relationships

```mermaid theme={null}
erDiagram
    Customer ||--o{ Account : has
    Account ||--o{ Transaction : has
    Customer ||--|| Tariff : assigned
    Tariff ||--o{ Fee : contains
    Fee ||--o{ Limit : contains
    Fee ||--o{ "Fee range" : contains
    Customer }o--o{ User : assigned
    Customer }o--o{ Shareholder : "stakeholders data"
    Shareholder }o--o{ Persona : "stakeholders data"
    User ||--|| Persona : "personal data"
```

## Common Fields

All entities share these standard fields:

| Field        | Type      | Description        |
| ------------ | --------- | ------------------ |
| id           | UUID      | Unique identifier  |
| created\_at  | timestamp | Creation timestamp |
| created\_by  | UUID      | Creator reference  |
| modified\_at | timestamp | Last update time   |
| modified\_by | UUID      | Modifier reference |
| active       | boolean   | Status flag        |
| metadata     | jsonb     | Custom attributes  |

## Security Features

* Role-based access control
* Data segregation
* Audit logging
* Field-level permissions
* Customer scoping

<Note>
  For detailed information on each entity's attributes and methods, refer to their respective API documentation sections.
</Note>
