@hed-hog/lms 0.0.269 → 0.0.274

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +487 -0
  2. package/hedhog/query/triggers.sql +0 -0
  3. package/hedhog/table/certificate.yaml +89 -0
  4. package/hedhog/table/certificate_template.yaml +24 -0
  5. package/hedhog/table/course.yaml +67 -1
  6. package/hedhog/table/course_category.yaml +22 -0
  7. package/hedhog/table/course_class_attendance.yaml +34 -0
  8. package/hedhog/table/course_class_group.yaml +58 -0
  9. package/hedhog/table/course_class_session.yaml +38 -0
  10. package/hedhog/table/course_class_session_instructor.yaml +27 -0
  11. package/hedhog/table/course_enrollment.yaml +45 -0
  12. package/hedhog/table/course_image.yaml +33 -0
  13. package/hedhog/table/course_lesson.yaml +35 -0
  14. package/hedhog/table/course_lesson_file.yaml +23 -0
  15. package/hedhog/table/course_lesson_instructor.yaml +27 -0
  16. package/hedhog/table/course_lesson_progress.yaml +40 -0
  17. package/hedhog/table/course_lesson_question.yaml +24 -0
  18. package/hedhog/table/course_module.yaml +25 -0
  19. package/hedhog/table/course_prerequisite.yaml +48 -0
  20. package/hedhog/table/evaluation_rating.yaml +30 -0
  21. package/hedhog/table/evaluation_topic.yaml +68 -0
  22. package/hedhog/table/exam.yaml +91 -0
  23. package/hedhog/table/exam_answer.yaml +40 -0
  24. package/hedhog/table/exam_attempt.yaml +51 -0
  25. package/hedhog/table/exam_image.yaml +33 -0
  26. package/hedhog/table/exam_option.yaml +25 -0
  27. package/hedhog/table/exam_question.yaml +24 -0
  28. package/hedhog/table/image_type.yaml +28 -0
  29. package/hedhog/table/instructor.yaml +23 -0
  30. package/hedhog/table/learning_path.yaml +49 -0
  31. package/hedhog/table/learning_path_enrollment.yaml +33 -0
  32. package/hedhog/table/learning_path_image.yaml +33 -0
  33. package/hedhog/table/learning_path_step.yaml +43 -0
  34. package/hedhog/table/question.yaml +15 -0
  35. package/package.json +10 -7
  36. package/src/index.ts +1 -1
  37. package/src/lms.module.ts +15 -15
  38. package/hedhog/table/classes.yaml +0 -3
  39. package/hedhog/table/exams.yaml +0 -3
  40. package/hedhog/table/reports.yaml +0 -3
  41. package/hedhog/table/training.yaml +0 -3
@@ -0,0 +1,34 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_class_session_id
4
+ type: fk
5
+ references:
6
+ table: course_class_session
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: student_id
10
+ type: fk
11
+ references:
12
+ table: person
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: present
16
+ type: boolean
17
+ default: false
18
+ - name: justification
19
+ type: text
20
+ isNullable: true
21
+ - name: recorded_by_id
22
+ type: fk
23
+ isNullable: true
24
+ references:
25
+ table: person
26
+ column: id
27
+ onDelete: SET NULL
28
+ - type: created_at
29
+ - type: updated_at
30
+
31
+ indices:
32
+ - columns: [course_class_session_id, student_id]
33
+ isUnique: true
34
+ - columns: [course_class_session_id]
@@ -0,0 +1,58 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ references:
6
+ table: course
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: title
10
+ type: varchar
11
+ length: 255
12
+ - name: code
13
+ type: varchar
14
+ length: 50
15
+ - name: description
16
+ type: text
17
+ isNullable: true
18
+ - name: delivery_mode
19
+ type: enum
20
+ values: [presential, online, hybrid]
21
+ - name: status
22
+ type: enum
23
+ values: [open, ongoing, completed, cancelled]
24
+ default: open
25
+ - name: start_date
26
+ type: datetime
27
+ - name: end_date
28
+ type: datetime
29
+ isNullable: true
30
+ - name: start_time
31
+ type: varchar
32
+ length: 5
33
+ isNullable: true
34
+ - name: end_time
35
+ type: varchar
36
+ length: 5
37
+ isNullable: true
38
+ - name: week_days
39
+ type: text
40
+ isNullable: true
41
+ - name: capacity
42
+ type: int
43
+ default: 30
44
+ - name: location
45
+ type: text
46
+ isNullable: true
47
+ - name: virtual_room_url
48
+ type: varchar
49
+ length: 500
50
+ isNullable: true
51
+ - type: created_at
52
+ - type: updated_at
53
+
54
+ indices:
55
+ - columns: [code]
56
+ isUnique: true
57
+ - columns: [course_id]
58
+ - columns: [status]
@@ -0,0 +1,38 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_class_group_id
4
+ type: fk
5
+ references:
6
+ table: course_class_group
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: title
10
+ type: varchar
11
+ length: 255
12
+ - name: description
13
+ type: text
14
+ isNullable: true
15
+ - name: session_date
16
+ type: datetime
17
+ - name: start_time
18
+ type: varchar
19
+ length: 5
20
+ - name: end_time
21
+ type: varchar
22
+ length: 5
23
+ - name: location
24
+ type: text
25
+ isNullable: true
26
+ - name: meeting_url
27
+ type: varchar
28
+ length: 500
29
+ isNullable: true
30
+ - name: status
31
+ type: enum
32
+ values: [scheduled, completed, cancelled]
33
+ default: scheduled
34
+ - type: created_at
35
+ - type: updated_at
36
+
37
+ indices:
38
+ - columns: [course_class_group_id, session_date]
@@ -0,0 +1,27 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_class_session_id
4
+ type: fk
5
+ references:
6
+ table: course_class_session
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: instructor_id
10
+ type: fk
11
+ references:
12
+ table: instructor
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: role
16
+ type: enum
17
+ values: [lead, assistant]
18
+ default: assistant
19
+ - type: created_at
20
+ - type: updated_at
21
+
22
+ indices:
23
+ - columns: [course_class_session_id, instructor_id]
24
+ isUnique: true
25
+ - columns: [course_class_session_id]
26
+ - columns: [instructor_id]
27
+ - columns: [role]
@@ -0,0 +1,45 @@
1
+ columns:
2
+ - type: pk
3
+ - name: person_id
4
+ type: fk
5
+ references:
6
+ table: person
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: course_class_group_id
10
+ type: fk
11
+ isNullable: true
12
+ references:
13
+ table: course_class_group
14
+ column: id
15
+ onDelete: SET NULL
16
+ - name: course_id
17
+ type: fk
18
+ references:
19
+ table: course
20
+ column: id
21
+ onDelete: CASCADE
22
+ - name: status
23
+ type: enum
24
+ values: [pending, active, completed, cancelled, paused]
25
+ default: active
26
+ - name: enrolled_at
27
+ type: datetime
28
+ - name: completed_at
29
+ type: datetime
30
+ isNullable: true
31
+ - name: progress_percent
32
+ type: int
33
+ default: 0
34
+ - name: final_score
35
+ type: int
36
+ isNullable: true
37
+ - type: created_at
38
+ - type: updated_at
39
+
40
+ indices:
41
+ - columns: [person_id, course_class_group_id]
42
+ isUnique: true
43
+ - columns: [person_id, course_id]
44
+ - columns: [course_class_group_id]
45
+ - columns: [status]
@@ -0,0 +1,33 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ references:
6
+ table: course
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: file_id
10
+ type: fk
11
+ references:
12
+ table: file
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: image_type_id
16
+ type: fk
17
+ references:
18
+ table: image_type
19
+ column: id
20
+ onDelete: CASCADE
21
+ - type: order
22
+ - name: is_primary
23
+ type: boolean
24
+ default: false
25
+ - type: created_at
26
+ - type: updated_at
27
+
28
+ indices:
29
+ - columns: [course_id]
30
+ - columns: [file_id]
31
+ - columns: [image_type_id]
32
+ - columns: [course_id, image_type_id, order]
33
+ isUnique: true
@@ -0,0 +1,35 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_module_id
4
+ type: fk
5
+ references:
6
+ table: course_module
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: title
10
+ type: varchar
11
+ length: 255
12
+ - name: description
13
+ type: text
14
+ isNullable: true
15
+ - name: type
16
+ type: enum
17
+ values: [video, text, quiz]
18
+ default: video
19
+ - name: content
20
+ type: text
21
+ isNullable: true
22
+ - name: duration_seconds
23
+ type: int
24
+ default: 0
25
+ - type: order
26
+ - name: is_released
27
+ type: boolean
28
+ default: true
29
+ - type: created_at
30
+ - type: updated_at
31
+
32
+ indices:
33
+ - columns: [course_module_id]
34
+ - columns: [course_module_id, order]
35
+ isUnique: true
@@ -0,0 +1,23 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_lesson_id
4
+ type: fk
5
+ references:
6
+ table: course_lesson
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: file_id
10
+ type: fk
11
+ isNullable: true
12
+ references:
13
+ table: file
14
+ column: id
15
+ onDelete: SET NULL
16
+ - name: title
17
+ type: varchar
18
+ length: 255
19
+ - type: created_at
20
+ - type: updated_at
21
+
22
+ indices:
23
+ - columns: [course_lesson_id]
@@ -0,0 +1,27 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_lesson_id
4
+ type: fk
5
+ references:
6
+ table: course_lesson
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: instructor_id
10
+ type: fk
11
+ references:
12
+ table: instructor
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: role
16
+ type: enum
17
+ values: [lead, assistant]
18
+ default: assistant
19
+ - type: created_at
20
+ - type: updated_at
21
+
22
+ indices:
23
+ - columns: [course_lesson_id, instructor_id]
24
+ isUnique: true
25
+ - columns: [course_lesson_id]
26
+ - columns: [instructor_id]
27
+ - columns: [role]
@@ -0,0 +1,40 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_enrollment_id
4
+ type: fk
5
+ references:
6
+ table: course_enrollment
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: course_lesson_id
10
+ type: fk
11
+ references:
12
+ table: course_lesson
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: status
16
+ type: enum
17
+ values: [not_started, in_progress, completed]
18
+ default: not_started
19
+ - name: progress_percent
20
+ type: int
21
+ default: 0
22
+ - name: video_progress_seconds
23
+ type: int
24
+ default: 0
25
+ - name: started_at
26
+ type: datetime
27
+ isNullable: true
28
+ - name: completed_at
29
+ type: datetime
30
+ isNullable: true
31
+ - name: time_spent_seconds
32
+ type: int
33
+ default: 0
34
+ - type: created_at
35
+ - type: updated_at
36
+
37
+ indices:
38
+ - columns: [course_enrollment_id, course_lesson_id]
39
+ isUnique: true
40
+ - columns: [course_lesson_id]
@@ -0,0 +1,24 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_lesson_id
4
+ type: fk
5
+ references:
6
+ table: course_lesson
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: question_id
10
+ type: fk
11
+ references:
12
+ table: question
13
+ column: id
14
+ onDelete: CASCADE
15
+ - type: order
16
+ - type: created_at
17
+ - type: updated_at
18
+
19
+ indices:
20
+ - columns: [course_lesson_id, question_id]
21
+ isUnique: true
22
+ - columns: [course_lesson_id, order]
23
+ isUnique: true
24
+ - columns: [question_id]
@@ -0,0 +1,25 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ references:
6
+ table: course
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: title
10
+ type: varchar
11
+ length: 255
12
+ - name: description
13
+ type: text
14
+ isNullable: true
15
+ - type: order
16
+ - name: duration_minutes
17
+ type: int
18
+ default: 0
19
+ - type: created_at
20
+ - type: updated_at
21
+
22
+ indices:
23
+ - columns: [course_id]
24
+ - columns: [course_id, order]
25
+ isUnique: true
@@ -0,0 +1,48 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ references:
6
+ table: course
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: prerequisite_type
10
+ type: enum
11
+ values: [course, learning_path, exam]
12
+ default: course
13
+ - name: prerequisite_course_id
14
+ type: fk
15
+ isNullable: true
16
+ references:
17
+ table: course
18
+ column: id
19
+ onDelete: CASCADE
20
+ - name: prerequisite_learning_path_id
21
+ type: fk
22
+ isNullable: true
23
+ references:
24
+ table: learning_path
25
+ column: id
26
+ onDelete: CASCADE
27
+ - name: prerequisite_exam_id
28
+ type: fk
29
+ isNullable: true
30
+ references:
31
+ table: exam
32
+ column: id
33
+ onDelete: CASCADE
34
+ - type: created_at
35
+ - type: updated_at
36
+
37
+ indices:
38
+ - columns: [course_id, prerequisite_course_id]
39
+ isUnique: true
40
+ - columns: [course_id, prerequisite_learning_path_id]
41
+ isUnique: true
42
+ - columns: [course_id, prerequisite_exam_id]
43
+ isUnique: true
44
+ - columns: [course_id]
45
+ - columns: [prerequisite_type]
46
+ - columns: [prerequisite_course_id]
47
+ - columns: [prerequisite_learning_path_id]
48
+ - columns: [prerequisite_exam_id]
@@ -0,0 +1,30 @@
1
+ columns:
2
+ - type: pk
3
+ - name: evaluation_topic_id
4
+ type: fk
5
+ references:
6
+ table: evaluation_topic
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: evaluator_id
10
+ type: fk
11
+ isNullable: true
12
+ references:
13
+ table: person
14
+ column: id
15
+ onDelete: SET NULL
16
+ - name: score
17
+ type: decimal
18
+ precision: 2
19
+ scale: 1
20
+ - name: comment
21
+ type: text
22
+ isNullable: true
23
+ - type: created_at
24
+ - type: updated_at
25
+
26
+ indices:
27
+ - columns: [evaluation_topic_id]
28
+ - columns: [evaluator_id]
29
+ - columns: [evaluation_topic_id, evaluator_id]
30
+ isUnique: true
@@ -0,0 +1,68 @@
1
+ columns:
2
+ - type: pk
3
+ - name: name
4
+ type: varchar
5
+ length: 255
6
+ - name: description
7
+ type: text
8
+ isNullable: true
9
+ - name: target_type
10
+ type: enum
11
+ values: [course, course_lesson, course_class_session, question, exam]
12
+ - name: course_id
13
+ type: fk
14
+ isNullable: true
15
+ references:
16
+ table: course
17
+ column: id
18
+ onDelete: SET NULL
19
+ - name: course_lesson_id
20
+ type: fk
21
+ isNullable: true
22
+ references:
23
+ table: course_lesson
24
+ column: id
25
+ onDelete: SET NULL
26
+ - name: course_class_session_id
27
+ type: fk
28
+ isNullable: true
29
+ references:
30
+ table: course_class_session
31
+ column: id
32
+ onDelete: SET NULL
33
+ - name: question_id
34
+ type: fk
35
+ isNullable: true
36
+ references:
37
+ table: question
38
+ column: id
39
+ onDelete: SET NULL
40
+ - name: exam_id
41
+ type: fk
42
+ isNullable: true
43
+ references:
44
+ table: exam
45
+ column: id
46
+ onDelete: SET NULL
47
+ - type: order
48
+ - name: is_active
49
+ type: boolean
50
+ default: true
51
+ - type: created_at
52
+ - type: updated_at
53
+
54
+ indices:
55
+ - columns: [target_type]
56
+ - columns: [course_id]
57
+ - columns: [course_lesson_id]
58
+ - columns: [course_class_session_id]
59
+ - columns: [question_id]
60
+ - columns: [exam_id]
61
+ - columns: [course_lesson_id, order]
62
+ isUnique: true
63
+ - columns: [course_class_session_id, order]
64
+ isUnique: true
65
+ - columns: [question_id, order]
66
+ isUnique: true
67
+ - columns: [exam_id, order]
68
+ isUnique: true
@@ -0,0 +1,91 @@
1
+ columns:
2
+ - type: pk
3
+ - name: course_id
4
+ type: fk
5
+ isNullable: true
6
+ references:
7
+ table: course
8
+ column: id
9
+ onDelete: SET NULL
10
+ - name: course_class_group_id
11
+ type: fk
12
+ isNullable: true
13
+ references:
14
+ table: course_class_group
15
+ column: id
16
+ onDelete: SET NULL
17
+ - name: title
18
+ type: varchar
19
+ length: 255
20
+ - name: description
21
+ type: text
22
+ isNullable: true
23
+ - name: instructions
24
+ type: text
25
+ isNullable: true
26
+ - name: exam_type
27
+ type: enum
28
+ values: [quiz, test, assignment, project]
29
+ - name: status
30
+ type: enum
31
+ values: [draft, published, closed, archived]
32
+ default: draft
33
+ - name: primary_color
34
+ type: varchar
35
+ length: 9
36
+ isNullable: true
37
+ - name: primary_contrast_color
38
+ type: varchar
39
+ length: 9
40
+ isNullable: true
41
+ - name: secondary_color
42
+ type: varchar
43
+ length: 9
44
+ isNullable: true
45
+ - name: secondary_contrast_color
46
+ type: varchar
47
+ length: 9
48
+ isNullable: true
49
+ - name: starts_at
50
+ type: datetime
51
+ isNullable: true
52
+ - name: ends_at
53
+ type: datetime
54
+ isNullable: true
55
+ - name: time_limit_minutes
56
+ type: int
57
+ isNullable: true
58
+ - name: attempts_allowed
59
+ type: int
60
+ default: 1
61
+ - name: min_score
62
+ type: int
63
+ default: 60
64
+ - name: max_score
65
+ type: int
66
+ default: 100
67
+ - name: shuffle_questions
68
+ type: boolean
69
+ default: false
70
+ - name: shuffle_options
71
+ type: boolean
72
+ default: false
73
+ - name: show_result
74
+ type: boolean
75
+ default: true
76
+ - name: show_answer_key
77
+ type: boolean
78
+ default: false
79
+ - name: show_explanation_after_answer
80
+ type: boolean
81
+ default: false
82
+ - name: require_all_questions_answered_to_finish
83
+ type: boolean
84
+ default: false
85
+ - type: created_at
86
+ - type: updated_at
87
+
88
+ indices:
89
+ - columns: [course_id]
90
+ - columns: [course_class_group_id]
91
+ - columns: [status]
@@ -0,0 +1,40 @@
1
+ columns:
2
+ - type: pk
3
+ - name: exam_attempt_id
4
+ type: fk
5
+ references:
6
+ table: exam_attempt
7
+ column: id
8
+ onDelete: CASCADE
9
+ - name: question_id
10
+ type: fk
11
+ references:
12
+ table: question
13
+ column: id
14
+ onDelete: CASCADE
15
+ - name: exam_option_id
16
+ type: fk
17
+ isNullable: true
18
+ references:
19
+ table: exam_option
20
+ column: id
21
+ onDelete: SET NULL
22
+ - name: answer_text
23
+ type: text
24
+ isNullable: true
25
+ - name: is_correct
26
+ type: boolean
27
+ isNullable: true
28
+ - name: points_awarded
29
+ type: int
30
+ default: 0
31
+ - name: teacher_feedback
32
+ type: text
33
+ isNullable: true
34
+ - type: created_at
35
+ - type: updated_at
36
+
37
+ indices:
38
+ - columns: [exam_attempt_id, question_id]
39
+ isUnique: true
40
+ - columns: [question_id]