> For the complete documentation index, see [llms.txt](https://docs.chamilo.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chamilo.org/2.x-nl/ontwikkelaarsgids/developer-guide/backend/entities-and-doctrine.md).

# Entiteiten en Doctrine

Chamilo 2.0 heeft 314 Doctrine-entiteiten verdeeld over twee bundles. Hieronder worden alleen de belangrijkste genoemd.

## Organisatie van Entiteiten

### CoreBundle Entiteiten (213)

Entiteiten op platformniveau:

| Categorie        | Voorbeelden                                                                |
| ---------------- | -------------------------------------------------------------------------- |
| **Gebruikers**   | `User`, `UserRelUser`, `AccessUrl`, `AccessUrlRelUser`                     |
| **Cursussen**    | `Course`, `CourseCategory`, `CourseRelUser`                                |
| **Sessies**      | `Session`, `SessionRelUser`, `SessionRelCourse`, `SessionRelCourseRelUser` |
| **Bronnen**      | `ResourceNode`, `ResourceFile`, `ResourceLink`, `ResourceType`             |
| **Instellingen** | `SettingsCurrent`, `SettingsOptions`                                       |
| **Berichten**    | `Message`, `MessageRelUser`, `MessageAttachment`                           |
| **Tracking**     | `TrackELogin`, `TrackEOnline`, `TrackEDefault`                             |
| **Vaardigheden** | `Skill`, `SkillRelUser`, `SkillRelProfile`                                 |
| **AI**           | `AiRequests`                                                               |
| **Plugins**      | `Plugin`, `AccessUrlRelPlugin`                                             |
| **Sociaal**      | `Usergroup`, `UsergroupRelUser`                                            |
| **xAPI**         | `XApiObject`, `XApiResult`, `XApiActivityState`                            |

### CourseBundle Entiteiten (101)

Entiteiten voor cursusinhoud — allemaal met het voorvoegsel `C`:

| Categorie         | Voorbeelden                                                                          |
| ----------------- | ------------------------------------------------------------------------------------ |
| **Documenten**    | `CDocument`                                                                          |
| **Oefeningen**    | `CQuiz`, `CQuizQuestion`, `CQuizAnswer`, `CQuizQuestionCategory`                     |
| **Leertrajecten** | `CLp`, `CLpItem`, `CLpView`, `CLpItemView`, `CLpCategory`                            |
| **Forums**        | `CForum`, `CForumCategory`, `CForumThread`, `CForumPost`                             |
| **Opdrachten**    | `CStudentPublication`, `CStudentPublicationAssignment`, `CStudentPublicationComment` |
| **Enquêtes**      | `CSurvey`, `CSurveyQuestion`, `CSurveyAnswer`, `CSurveyInvitation`                   |
| **Aanwezigheid**  | `CAttendance`, `CAttendanceCalendar`, `CAttendanceResult`                            |
| **Blogs**         | `CBlog`, `CBlogPost`, `CBlogComment`, `CBlogTask`                                    |
| **Overig**        | `CCalendarEvent`, `CGlossary`, `CLink`, `CLinkCategory`, `CNotebook`, `CWiki`        |

## Naamconventie

* CoreBundle-entiteiten: standaard PascalCase (bijv. `User`, `Course`, `Session`)
* CourseBundle-entiteiten: met voorvoegsel `C` (bijv. `CDocument`, `CQuiz`, `CLp`)

Dit voorvoegsel onderscheidt inhoudsentiteiten op cursusniveau van entiteiten op platformniveau (in lijn met de naamgeving van oudere databasetabellen). Dit onderscheid kan op lange termijn verdwijnen naarmate meer tools worden omgezet naar globale tools zonder een sterke koppeling aan een specifieke cursus.

## Belangrijke Relaties

Relaties worden meestal aangeduid met de scheidingsteken `Rel`.

### Gebruiker ↔ Cursus

```
User --[CourseRelUser]--> Course
```

`CourseRelUser` slaat de inschrijvingsstatus op (TEACHER = 1, STUDENT = 5).

### Gebruiker ↔ Sessie ↔ Cursus

```
User --[SessionRelUser]--> Session --[SessionRelCourse]--> Course
User --[SessionRelCourseRelUser]--> (Session + Course)
```

### ResourceNode (Inhoudsabstractie)

Alle inhoudsentiteiten van cursussen zijn verbonden met het bronnensysteem via `ResourceNode`:

```
CDocument --> ResourceNode --> ResourceFile
CQuiz ------> ResourceNode
CLp --------> ResourceNode
```

Zie [Bronsysteem](/2.x-nl/ontwikkelaarsgids/developer-guide/backend/resource-system.md) voor meer informatie.

## Doctrine Uitbreidingen

Chamilo gebruikt Gedmo Doctrine Extensions (via `stof/doctrine-extensions-bundle`):

* **Tree** — Hiërarchische gegevens (ResourceNode gebruikt materialized path)
* **Timestampable** — Automatische `createdAt`/`updatedAt` velden
* **Sluggable** — URL-vriendelijke slugs
* **Sortable** — Sorteerbare collecties


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chamilo.org/2.x-nl/ontwikkelaarsgids/developer-guide/backend/entities-and-doctrine.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
