Appearance
modules
Modules / sections of a product. They group lessons hierarchically (a module can contain sub-modules).
- ETL strategy:
merge - PK:
id
Columns
| Column | Type | Description |
|---|---|---|
id | BIGINT | PK. |
id_tenant | BIGINT | FK → tenants.id. |
id_origin | BIGINT | Parent module id when replicated. |
id_product | BIGINT | FK → products.id. |
id_section | BIGINT | FK → another modules.id. When set, this module is a sub-module of another. |
is_draft | BOOLEAN | Draft. |
position | INTEGER | Order within the parent product/module. |
title | TEXT | Module name. |
created_at | TIMESTAMPTZ | |
deleted_at | TIMESTAMPTZ |
Relationships
- Parent:
tenants,products; self-relation viaid_section. - Children:
lessonsviaid_section(lessons point to the module they live in).
Heads-up: lessons use
lessons.id_sectionto point at their module. The nameid_sectionis preserved unchanged — read it as "parent module id".