docs: Add Forgejo and development setup guides, and refactor API documentation structure.

This commit is contained in:
JakkrapartXD 2025-12-23 16:02:17 +07:00
parent 7b1ed6f6cc
commit a6427b2083
9 changed files with 2446 additions and 7 deletions

View file

@ -66,6 +66,9 @@ Table lessons {
content jsonb [note: 'multi-language lesson content']
type varchar [not null, note: 'video | pdf | text | quiz']
sort_order int [not null, default: 0, note: 'must be >= 0']
is_sequential boolean [not null, default: true, note: 'require previous lessons to be completed']
prerequisite_lesson_ids jsonb [note: 'array of lesson IDs that must be completed first, e.g. [1, 2, 3]']
require_pass_quiz boolean [default: false, note: 'require passing quiz to unlock next lessons']
created_at datetime [not null, default: `now()`]
updated_at datetime [not null, default: `now()`]
@ -214,6 +217,23 @@ Table announcement_attachments {
}
}
Table lesson_attachments {
id int [pk, increment]
lesson_id int [not null, ref: > lessons.id]
file_name varchar [not null]
file_path varchar [not null, note: 'S3 key or file path']
file_size int [not null, note: 'in bytes']
mime_type varchar [not null]
description jsonb [note: 'multi-language description']
sort_order int [not null, default: 0]
created_at datetime [not null, default: `now()`]
indexes {
lesson_id
(lesson_id, sort_order)
}
}
Table orders {
id int [pk, increment]
user_id int [not null, ref: > users.id]