<aside> <img src="/icons/checklist_green.svg" alt="/icons/checklist_green.svg" width="40px" />
</aside>
Table modules [note: 'Bảng quản lý module (chủ đề) trong mỗi khóa học']
{
id uuid [pk, note: 'Khóa chính của module']
course_id uuid [ref: > courses.product_id, note: 'Thuộc khóa nào']
title varchar [not null, note: 'Tên module']
short_description text [not null]
order int [default: 0, note: 'Thứ tự module trong course']
status enum [default: 'draft']
created_at timestamp [default: `now()`, note: 'Tạo lúc nào']
updated_at timestamp [default: `now()`, note: 'Cập nhật lần cuối']
deleted_at timestamp [null, note: 'Soft-delete']
}
course_id phải tham chiếu tới courses.product_id của một Course tồn tại và deleted_at = null.archived hoặc soft-deleted (deleted_at ≠ null), tất cả Module của Course đó cần được soft-deleted cascade.title
short_description
course_id giống nhau), giá trị order phải unique.lessons.module_id = module.id) phải soft-deleted cascade.