Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .tbls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# tbls configuration (used by `make mpd`): document the application schema
# only, not Liquibase's bookkeeping tables.
exclude:
- databasechangelog
- databasechangeloglock
12 changes: 11 additions & 1 deletion GLOSSAIRE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ pour la justification des décisions de conception, voir les [ADR](docs/adr/READ
- **Drop a course (abandonner un cours)** — Le retrait d'un étudiant d'un cours
avant de l'avoir terminé.
- **Enrollment (inscription)** — La relation qui lie un étudiant à un cours
qu'il a rejoint.
qu'il a rejoint. Persistée comme une *entité de jointure* sur la table
`enrollments`, identifiée par la paire (utilisateur, cours), avec un statut
qui suit le cycle de vie de la progression de l'étudiant (voir
CONTRIBUTING.md).
- **Lesson (leçon)** — Un élément de contenu individuel au sein d'un cours.
- **Role (rôle)** — Un ensemble nommé de permissions accordées à un
utilisateur. Les rôles fournis par défaut sont `STUDENT`, `INSTRUCTOR` et
Expand Down Expand Up @@ -84,6 +87,13 @@ pour la justification des décisions de conception, voir les [ADR](docs/adr/READ
relations (produit ici avec Mermaid).
- **Hibernate** — L'implémentation JPA (ORM) utilisée pour faire correspondre
les entités Java aux tables.
- **Entité de jointure (join entity)** — Une association plusieurs-à-plusieurs
promue en entité JPA à part entière parce que la relation porte son propre
état (par exemple `Enrollment` avec son statut et ses horodatages). Sa clé
primaire est le composite des deux clés étrangères (`@EmbeddedId`), et
`@MapsId` permet aux deux références `@ManyToOne` de réutiliser ces colonnes
de clé. À distinguer d'une simple *table* de jointure comme `user_roles`,
qui reste invisible derrière `@ManyToMany`.
- **JPA (Jakarta Persistence API)** — L'API Java standard du mapping
objet-relationnel ; implémentée par Hibernate.
- **JSESSIONID** — Le nom par défaut du cookie de session servlet.
Expand Down
11 changes: 10 additions & 1 deletion GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ rationale behind design decisions, see the [ADRs](docs/adr/README.md).
- **Deactivate** — Disable an account (for example an instructor or student) so it
can no longer be used, without deleting it. See also *disabled account*.
- **Drop a course** — A student withdrawing from a course before finishing it.
- **Enrollment** — The relationship linking a student to a course they have joined.
- **Enrollment** — The relationship linking a student to a course they have
joined. Persisted as a *join entity* on the `enrollments` table, keyed by
the (user, course) pair, with a status following the student course
progress lifecycle (see CONTRIBUTING.md).
- **Lesson** — An individual piece of content within a course.
- **Role** — A named set of permissions granted to a user. The seeded roles are
`STUDENT`, `INSTRUCTOR`, and `ADMIN`; `SUPERADMIN` is planned (see issue #65).
Expand Down Expand Up @@ -69,6 +72,12 @@ rationale behind design decisions, see the [ADRs](docs/adr/README.md).
- **ERD (Entity-Relationship Diagram)** — A diagram of entities and their
relationships (rendered here with Mermaid).
- **Hibernate** — The JPA implementation (ORM) used to map Java entities to tables.
- **Join entity** — A many-to-many association promoted to a full JPA entity
because the relationship carries state of its own (for example `Enrollment`
with its status and timestamps). Its primary key is the composite of the two
foreign keys (`@EmbeddedId`), and `@MapsId` lets the two `@ManyToOne`
references reuse those key columns. Contrast with a plain join *table* like
`user_roles`, which stays invisible behind `@ManyToMany`.
- **JPA (Jakarta Persistence API)** — The standard Java API for object-relational
mapping; implemented by Hibernate.
- **JSESSIONID** — The default name of the servlet session cookie.
Expand Down
15 changes: 14 additions & 1 deletion docs/database/merise/learn-dev.mcd
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,17 @@ Performs, 01 Audit Log, 0N User
Requests, 11 Reset Token, 0N User
User: user_id, username, email, password, first_name, last_name, is_active, is_verified, is_locked, failed_login_attempts, last_login_at, password_changed_at
Holds, 0N User, 0N Role : assigned_at, assigned_by
Role: role_id, role_name, description, is_active
Role: role_id, role_name, description, is_active
:

% Course/lesson domain. Teaches materializes as courses.instructor_id in the
% MLD/MPD; Enrolls (many-to-many with attributes) becomes the enrollments table.
:
Teaches, 0N User, 11 Course
Enrolls, 0N User, 0N Course : status, enrolled_at, completed_at, dropped_at
:

Lesson: lesson_id, title, content_markdown, position, status, created_at, updated_at
Contains, 0N Course, 11 Lesson
Course: course_id, title, description, status, published_at, created_at, updated_at
:
Loading