laudes commited on
Commit
aff66f3
·
verified ·
1 Parent(s): ebee478

Delete schema.json

Browse files
Files changed (1) hide show
  1. schema.json +0 -2064
schema.json DELETED
@@ -1,2064 +0,0 @@
1
- {
2
- "agent_absences": {
3
- "comment": "Records instances when agents are absent from classes",
4
- "columns": [
5
- {
6
- "name": "absence_id",
7
- "data_type": "integer",
8
- "comment": "Unique internal absence ID"
9
- },
10
- {
11
- "name": "agent_id",
12
- "data_type": "integer",
13
- "comment": "Reference to the absent agent"
14
- },
15
- {
16
- "name": "class_id",
17
- "data_type": "integer",
18
- "comment": "Reference to the class affected by the absence"
19
- },
20
- {
21
- "name": "absence_date",
22
- "data_type": "date",
23
- "comment": "Date of the agent's absence"
24
- },
25
- {
26
- "name": "reported_at",
27
- "data_type": "timestamp without time zone",
28
- "comment": "Timestamp when the absence was reported"
29
- },
30
- {
31
- "name": "reason",
32
- "data_type": "text",
33
- "comment": "Reason for the agent's absence"
34
- }
35
- ],
36
- "foreign_keys": [
37
- {
38
- "column": "agent_id",
39
- "references": {
40
- "table": "agents",
41
- "column": "agent_id"
42
- }
43
- },
44
- {
45
- "column": "class_id",
46
- "references": {
47
- "table": "classes",
48
- "column": "class_id"
49
- }
50
- }
51
- ]
52
- },
53
- "agent_notes": {
54
- "comment": "Stores historical notes and remarks about agents",
55
- "columns": [
56
- {
57
- "name": "note_id",
58
- "data_type": "integer",
59
- "comment": "Unique internal note ID"
60
- },
61
- {
62
- "name": "agent_id",
63
- "data_type": "integer",
64
- "comment": "Reference to the agent"
65
- },
66
- {
67
- "name": "note_date",
68
- "data_type": "timestamp without time zone",
69
- "comment": "Timestamp when the note was created"
70
- },
71
- {
72
- "name": "note",
73
- "data_type": "text",
74
- "comment": "Content of the note regarding the agent"
75
- }
76
- ],
77
- "foreign_keys": [
78
- {
79
- "column": "agent_id",
80
- "references": {
81
- "table": "agents",
82
- "column": "agent_id"
83
- }
84
- }
85
- ]
86
- },
87
- "agent_orders": {
88
- "comment": "Stores order information related to agents and classes",
89
- "columns": [
90
- {
91
- "name": "updated_at",
92
- "data_type": "timestamp without time zone",
93
- "comment": "Timestamp when the order record was last updated"
94
- },
95
- {
96
- "name": "agent_id",
97
- "data_type": "integer",
98
- "comment": "Reference to the agent"
99
- },
100
- {
101
- "name": "class_id",
102
- "data_type": "integer",
103
- "comment": "Reference to the class"
104
- },
105
- {
106
- "name": "created_at",
107
- "data_type": "timestamp without time zone",
108
- "comment": "Timestamp when the order record was created"
109
- },
110
- {
111
- "name": "order_id",
112
- "data_type": "integer",
113
- "comment": "Unique internal order ID"
114
- },
115
- {
116
- "name": "class_time",
117
- "data_type": "time without time zone",
118
- "comment": "Time when the class is scheduled"
119
- },
120
- {
121
- "name": "order_hours",
122
- "data_type": "integer",
123
- "comment": "Number of hours linked to the agent's order for a specific class"
124
- },
125
- {
126
- "name": "order_number",
127
- "data_type": "character varying",
128
- "comment": "Valid order number associated with the agent"
129
- },
130
- {
131
- "name": "class_days",
132
- "data_type": "character varying",
133
- "comment": "Days when the class is scheduled"
134
- }
135
- ],
136
- "foreign_keys": [
137
- {
138
- "column": "agent_id",
139
- "references": {
140
- "table": "agents",
141
- "column": "agent_id"
142
- }
143
- },
144
- {
145
- "column": "class_id",
146
- "references": {
147
- "table": "classes",
148
- "column": "class_id"
149
- }
150
- }
151
- ]
152
- },
153
- "agent_products": {
154
- "comment": "Associates agents with the products they are trained to teach",
155
- "columns": [
156
- {
157
- "name": "agent_id",
158
- "data_type": "integer",
159
- "comment": "Reference to the agent"
160
- },
161
- {
162
- "name": "product_id",
163
- "data_type": "integer",
164
- "comment": "Reference to the product the agent is trained in"
165
- },
166
- {
167
- "name": "trained_start_date",
168
- "data_type": "date",
169
- "comment": "Start date when the agent began training in the product"
170
- },
171
- {
172
- "name": "trained_end_date",
173
- "data_type": "date",
174
- "comment": "End date when the agent finished training in the product"
175
- }
176
- ],
177
- "foreign_keys": [
178
- {
179
- "column": "agent_id",
180
- "references": {
181
- "table": "agents",
182
- "column": "agent_id"
183
- }
184
- },
185
- {
186
- "column": "product_id",
187
- "references": {
188
- "table": "products",
189
- "column": "product_id"
190
- }
191
- }
192
- ]
193
- },
194
- "agent_qa_visits": {
195
- "comment": "Records QA visits involving agents and classes",
196
- "columns": [
197
- {
198
- "name": "visit_id",
199
- "data_type": "integer",
200
- "comment": "Unique internal QA visit ID"
201
- },
202
- {
203
- "name": "agent_id",
204
- "data_type": "integer",
205
- "comment": "Reference to the agent"
206
- },
207
- {
208
- "name": "class_id",
209
- "data_type": "integer",
210
- "comment": "Reference to the class"
211
- },
212
- {
213
- "name": "visit_date",
214
- "data_type": "date",
215
- "comment": "Date of the QA visit"
216
- },
217
- {
218
- "name": "qa_report_id",
219
- "data_type": "integer",
220
- "comment": "Reference to the associated QA report"
221
- }
222
- ],
223
- "foreign_keys": [
224
- {
225
- "column": "agent_id",
226
- "references": {
227
- "table": "agents",
228
- "column": "agent_id"
229
- }
230
- },
231
- {
232
- "column": "class_id",
233
- "references": {
234
- "table": "classes",
235
- "column": "class_id"
236
- }
237
- },
238
- {
239
- "column": "qa_report_id",
240
- "references": {
241
- "table": "qa_reports",
242
- "column": "qa_report_id"
243
- }
244
- }
245
- ]
246
- },
247
- "agent_replacements": {
248
- "comment": "Records instances of agent replacements in classes",
249
- "columns": [
250
- {
251
- "name": "replacement_id",
252
- "data_type": "integer",
253
- "comment": "Unique internal replacement ID"
254
- },
255
- {
256
- "name": "class_id",
257
- "data_type": "integer",
258
- "comment": "Reference to the class"
259
- },
260
- {
261
- "name": "original_agent_id",
262
- "data_type": "integer",
263
- "comment": "Reference to the original agent"
264
- },
265
- {
266
- "name": "replacement_agent_id",
267
- "data_type": "integer",
268
- "comment": "Reference to the replacement agent"
269
- },
270
- {
271
- "name": "start_date",
272
- "data_type": "date",
273
- "comment": "Date when the replacement starts"
274
- },
275
- {
276
- "name": "end_date",
277
- "data_type": "date",
278
- "comment": "Date when the replacement ends"
279
- },
280
- {
281
- "name": "reason",
282
- "data_type": "text",
283
- "comment": "Reason for the agent's replacement"
284
- }
285
- ],
286
- "foreign_keys": [
287
- {
288
- "column": "class_id",
289
- "references": {
290
- "table": "classes",
291
- "column": "class_id"
292
- }
293
- },
294
- {
295
- "column": "original_agent_id",
296
- "references": {
297
- "table": "agents",
298
- "column": "agent_id"
299
- }
300
- },
301
- {
302
- "column": "replacement_agent_id",
303
- "references": {
304
- "table": "agents",
305
- "column": "agent_id"
306
- }
307
- }
308
- ]
309
- },
310
- "agents": {
311
- "comment": "Stores information about agents (instructors or facilitators)",
312
- "columns": [
313
- {
314
- "name": "agent_id",
315
- "data_type": "integer",
316
- "comment": "Unique internal agent ID"
317
- },
318
- {
319
- "name": "residential_town_id",
320
- "data_type": "integer",
321
- "comment": "Reference to the town where the agent lives"
322
- },
323
- {
324
- "name": "preferred_working_area_1",
325
- "data_type": "integer",
326
- "comment": "Agent's first preferred working area"
327
- },
328
- {
329
- "name": "preferred_working_area_2",
330
- "data_type": "integer",
331
- "comment": "Agent's second preferred working area"
332
- },
333
- {
334
- "name": "preferred_working_area_3",
335
- "data_type": "integer",
336
- "comment": "Agent's third preferred working area"
337
- },
338
- {
339
- "name": "sace_registration_date",
340
- "data_type": "date",
341
- "comment": "Date when the agent's SACE registration became effective"
342
- },
343
- {
344
- "name": "sace_expiry_date",
345
- "data_type": "date",
346
- "comment": "Expiry date of the agent's provisional SACE registration"
347
- },
348
- {
349
- "name": "date_loaded",
350
- "data_type": "date",
351
- "comment": "Date when the agent was added to the system"
352
- },
353
- {
354
- "name": "quantum_result_communications",
355
- "data_type": "numeric",
356
- "comment": "Agent's competence score in Communications (percentage)"
357
- },
358
- {
359
- "name": "quantum_result_mathematics",
360
- "data_type": "numeric",
361
- "comment": "Agent's competence score in Mathematics (percentage)"
362
- },
363
- {
364
- "name": "quantum_result_training",
365
- "data_type": "numeric",
366
- "comment": "Agent's competence score in Training/Facilitating (percentage)"
367
- },
368
- {
369
- "name": "agent_training_date",
370
- "data_type": "date",
371
- "comment": "Date when the agent received induction training"
372
- },
373
- {
374
- "name": "signed_agreement",
375
- "data_type": "boolean",
376
- "comment": "Indicates if the agent has a signed agreement (true) or not (false)"
377
- },
378
- {
379
- "name": "signed_agreement_date",
380
- "data_type": "date",
381
- "comment": "Date when the agent signed the agreement"
382
- },
383
- {
384
- "name": "created_at",
385
- "data_type": "timestamp without time zone",
386
- "comment": "Timestamp when the agent record was created"
387
- },
388
- {
389
- "name": "updated_at",
390
- "data_type": "timestamp without time zone",
391
- "comment": "Timestamp when the agent record was last updated"
392
- },
393
- {
394
- "name": "bank_name",
395
- "data_type": "character varying",
396
- "comment": "Name of the agent's bank"
397
- },
398
- {
399
- "name": "highest_qualification",
400
- "data_type": "character varying",
401
- "comment": "Highest qualification the agent has achieved"
402
- },
403
- {
404
- "name": "sace_registration_number",
405
- "data_type": "character varying",
406
- "comment": "Agent's SACE (South African Council for Educators) registration number"
407
- },
408
- {
409
- "name": "first_name",
410
- "data_type": "character varying",
411
- "comment": "Agent's first name"
412
- },
413
- {
414
- "name": "initials",
415
- "data_type": "character varying",
416
- "comment": "Agent's initials"
417
- },
418
- {
419
- "name": "surname",
420
- "data_type": "character varying",
421
- "comment": "Agent's surname"
422
- },
423
- {
424
- "name": "gender",
425
- "data_type": "character varying",
426
- "comment": "Agent's gender"
427
- },
428
- {
429
- "name": "race",
430
- "data_type": "character varying",
431
- "comment": "Agent's race; options include 'African', 'Coloured', 'White', 'Indian'"
432
- },
433
- {
434
- "name": "sa_id_no",
435
- "data_type": "character varying",
436
- "comment": "Agent's South African ID number"
437
- },
438
- {
439
- "name": "passport_number",
440
- "data_type": "character varying",
441
- "comment": "Agent's passport number if they are a foreigner"
442
- },
443
- {
444
- "name": "tel_number",
445
- "data_type": "character varying",
446
- "comment": "Agent's primary telephone number"
447
- },
448
- {
449
- "name": "email_address",
450
- "data_type": "character varying",
451
- "comment": "Agent's email address"
452
- },
453
- {
454
- "name": "residential_address_line",
455
- "data_type": "character varying",
456
- "comment": "Agent's residential street address"
457
- },
458
- {
459
- "name": "residential_suburb",
460
- "data_type": "character varying",
461
- "comment": "Agent's residential suburb"
462
- },
463
- {
464
- "name": "bank_branch_code",
465
- "data_type": "character varying",
466
- "comment": "Branch code of the agent's bank"
467
- },
468
- {
469
- "name": "residential_postal_code",
470
- "data_type": "character varying",
471
- "comment": "Postal code of the agent's residential area"
472
- },
473
- {
474
- "name": "bank_account_number",
475
- "data_type": "character varying",
476
- "comment": "Agent's bank account number"
477
- },
478
- {
479
- "name": "agent_notes",
480
- "data_type": "text",
481
- "comment": "Notes regarding the agent's performance, issues, or other relevant information"
482
- }
483
- ],
484
- "foreign_keys": [
485
- {
486
- "column": "preferred_working_area_1",
487
- "references": {
488
- "table": "locations",
489
- "column": "location_id"
490
- }
491
- },
492
- {
493
- "column": "preferred_working_area_2",
494
- "references": {
495
- "table": "locations",
496
- "column": "location_id"
497
- }
498
- },
499
- {
500
- "column": "preferred_working_area_3",
501
- "references": {
502
- "table": "locations",
503
- "column": "location_id"
504
- }
505
- },
506
- {
507
- "column": "residential_town_id",
508
- "references": {
509
- "table": "locations",
510
- "column": "location_id"
511
- }
512
- }
513
- ]
514
- },
515
- "attendance_records": {
516
- "comment": "Associates learners with their attendance status on specific dates",
517
- "columns": [
518
- {
519
- "name": "register_id",
520
- "data_type": "integer",
521
- "comment": "Reference to the attendance register"
522
- },
523
- {
524
- "name": "learner_id",
525
- "data_type": "integer",
526
- "comment": "Reference to the learner"
527
- },
528
- {
529
- "name": "status",
530
- "data_type": "character varying",
531
- "comment": "Attendance status of the learner (e.g., 'Present', 'Absent')"
532
- }
533
- ],
534
- "foreign_keys": [
535
- {
536
- "column": "learner_id",
537
- "references": {
538
- "table": "learners",
539
- "column": "learner_id"
540
- }
541
- },
542
- {
543
- "column": "register_id",
544
- "references": {
545
- "table": "attendance_registers",
546
- "column": "register_id"
547
- }
548
- }
549
- ]
550
- },
551
- "attendance_registers": {
552
- "comment": "Records attendance registers for classes",
553
- "columns": [
554
- {
555
- "name": "register_id",
556
- "data_type": "integer",
557
- "comment": "Unique internal attendance register ID"
558
- },
559
- {
560
- "name": "class_id",
561
- "data_type": "integer",
562
- "comment": "Reference to the class"
563
- },
564
- {
565
- "name": "date",
566
- "data_type": "date",
567
- "comment": "Date of the attendance"
568
- },
569
- {
570
- "name": "agent_id",
571
- "data_type": "integer",
572
- "comment": "Reference to the agent who conducted the attendance"
573
- },
574
- {
575
- "name": "created_at",
576
- "data_type": "timestamp without time zone",
577
- "comment": "Timestamp when the attendance register was created"
578
- },
579
- {
580
- "name": "updated_at",
581
- "data_type": "timestamp without time zone",
582
- "comment": "Timestamp when the attendance register was last updated"
583
- }
584
- ],
585
- "foreign_keys": [
586
- {
587
- "column": "agent_id",
588
- "references": {
589
- "table": "agents",
590
- "column": "agent_id"
591
- }
592
- },
593
- {
594
- "column": "class_id",
595
- "references": {
596
- "table": "classes",
597
- "column": "class_id"
598
- }
599
- }
600
- ]
601
- },
602
- "class_agents": {
603
- "comment": "Associates agents with classes they facilitate, including their roles and durations",
604
- "columns": [
605
- {
606
- "name": "class_id",
607
- "data_type": "integer",
608
- "comment": "Reference to the class"
609
- },
610
- {
611
- "name": "agent_id",
612
- "data_type": "integer",
613
- "comment": "Reference to the agent facilitating the class"
614
- },
615
- {
616
- "name": "start_date",
617
- "data_type": "date",
618
- "comment": "Date when the agent started facilitating the class"
619
- },
620
- {
621
- "name": "end_date",
622
- "data_type": "date",
623
- "comment": "Date when the agent stopped facilitating the class"
624
- },
625
- {
626
- "name": "role",
627
- "data_type": "character varying",
628
- "comment": "Role of the agent in the class (e.g., 'Original', 'Backup', 'Replacement')"
629
- }
630
- ],
631
- "foreign_keys": [
632
- {
633
- "column": "agent_id",
634
- "references": {
635
- "table": "agents",
636
- "column": "agent_id"
637
- }
638
- },
639
- {
640
- "column": "class_id",
641
- "references": {
642
- "table": "classes",
643
- "column": "class_id"
644
- }
645
- }
646
- ]
647
- },
648
- "class_notes": {
649
- "comment": "Stores historical notes and remarks about classes",
650
- "columns": [
651
- {
652
- "name": "note_id",
653
- "data_type": "integer",
654
- "comment": "Unique internal note ID"
655
- },
656
- {
657
- "name": "class_id",
658
- "data_type": "integer",
659
- "comment": "Reference to the class"
660
- },
661
- {
662
- "name": "note_date",
663
- "data_type": "timestamp without time zone",
664
- "comment": "Timestamp when the note was created"
665
- },
666
- {
667
- "name": "note",
668
- "data_type": "text",
669
- "comment": "Content of the note regarding the class"
670
- }
671
- ],
672
- "foreign_keys": [
673
- {
674
- "column": "class_id",
675
- "references": {
676
- "table": "classes",
677
- "column": "class_id"
678
- }
679
- }
680
- ]
681
- },
682
- "class_schedules": {
683
- "comment": "Stores scheduling information for classes",
684
- "columns": [
685
- {
686
- "name": "schedule_id",
687
- "data_type": "integer",
688
- "comment": "Unique internal schedule ID"
689
- },
690
- {
691
- "name": "class_id",
692
- "data_type": "integer",
693
- "comment": "Reference to the class"
694
- },
695
- {
696
- "name": "start_time",
697
- "data_type": "time without time zone",
698
- "comment": "Class start time"
699
- },
700
- {
701
- "name": "end_time",
702
- "data_type": "time without time zone",
703
- "comment": "Class end time"
704
- },
705
- {
706
- "name": "day_of_week",
707
- "data_type": "character varying",
708
- "comment": "Day of the week when the class occurs (e.g., 'Monday')"
709
- }
710
- ],
711
- "foreign_keys": [
712
- {
713
- "column": "class_id",
714
- "references": {
715
- "table": "classes",
716
- "column": "class_id"
717
- }
718
- }
719
- ]
720
- },
721
- "class_subjects": {
722
- "comment": "Associates classes with the subjects or products being taught",
723
- "columns": [
724
- {
725
- "name": "class_id",
726
- "data_type": "integer",
727
- "comment": "Reference to the class"
728
- },
729
- {
730
- "name": "product_id",
731
- "data_type": "integer",
732
- "comment": "Reference to the subject or product taught in the class"
733
- }
734
- ],
735
- "foreign_keys": [
736
- {
737
- "column": "class_id",
738
- "references": {
739
- "table": "classes",
740
- "column": "class_id"
741
- }
742
- },
743
- {
744
- "column": "product_id",
745
- "references": {
746
- "table": "products",
747
- "column": "product_id"
748
- }
749
- }
750
- ]
751
- },
752
- "classes": {
753
- "comment": "Stores information about classes, including scheduling and associations",
754
- "columns": [
755
- {
756
- "name": "updated_at",
757
- "data_type": "timestamp without time zone",
758
- "comment": "Timestamp when the class record was last updated"
759
- },
760
- {
761
- "name": "client_id",
762
- "data_type": "integer",
763
- "comment": "Reference to the client associated with the class"
764
- },
765
- {
766
- "name": "stop_date",
767
- "data_type": "date",
768
- "comment": "Date when the class stopped"
769
- },
770
- {
771
- "name": "restart_date",
772
- "data_type": "date",
773
- "comment": "Date when the class restarted"
774
- },
775
- {
776
- "name": "seta_funded",
777
- "data_type": "boolean",
778
- "comment": "Indicates if the project is SETA funded (true) or not (false)"
779
- },
780
- {
781
- "name": "exam_class",
782
- "data_type": "boolean",
783
- "comment": "Indicates if this is an exam project (true) or not (false)"
784
- },
785
- {
786
- "name": "project_supervisor_id",
787
- "data_type": "integer",
788
- "comment": "Reference to the project supervisor managing the class"
789
- },
790
- {
791
- "name": "delivery_date",
792
- "data_type": "date",
793
- "comment": "Date when materials or resources must be delivered to the class"
794
- },
795
- {
796
- "name": "collection_date",
797
- "data_type": "date",
798
- "comment": "Date when portfolios or materials must be collected from the class"
799
- },
800
- {
801
- "name": "created_at",
802
- "data_type": "timestamp without time zone",
803
- "comment": "Timestamp when the class record was created"
804
- },
805
- {
806
- "name": "class_id",
807
- "data_type": "integer",
808
- "comment": "Unique internal class ID"
809
- },
810
- {
811
- "name": "class_town_id",
812
- "data_type": "integer",
813
- "comment": "Reference to the town where the class takes place"
814
- },
815
- {
816
- "name": "original_start_date",
817
- "data_type": "date",
818
- "comment": "Original start date of the class"
819
- },
820
- {
821
- "name": "class_site_name",
822
- "data_type": "character varying",
823
- "comment": "Name of the class or site"
824
- },
825
- {
826
- "name": "class_address_line",
827
- "data_type": "character varying",
828
- "comment": "Street address where the class takes place"
829
- },
830
- {
831
- "name": "class_suburb",
832
- "data_type": "character varying",
833
- "comment": "Suburb where the class takes place"
834
- },
835
- {
836
- "name": "class_notes",
837
- "data_type": "text",
838
- "comment": "Notes about the class; important information to remember"
839
- },
840
- {
841
- "name": "class_postal_code",
842
- "data_type": "character varying",
843
- "comment": "Postal code of the class location"
844
- },
845
- {
846
- "name": "class_type",
847
- "data_type": "character varying",
848
- "comment": "Type of class; determines the 'rules' (e.g., 'Employed', 'Community')"
849
- },
850
- {
851
- "name": "class_status",
852
- "data_type": "character varying",
853
- "comment": "Status of the class (e.g., 'New', 'Restarted', 'Stopped')"
854
- },
855
- {
856
- "name": "exam_type",
857
- "data_type": "character varying",
858
- "comment": "Type of exam associated with the class"
859
- },
860
- {
861
- "name": "seta",
862
- "data_type": "character varying",
863
- "comment": "Name of the SETA (Sector Education and Training Authority) the client belongs to"
864
- }
865
- ],
866
- "foreign_keys": [
867
- {
868
- "column": "class_town_id",
869
- "references": {
870
- "table": "locations",
871
- "column": "location_id"
872
- }
873
- },
874
- {
875
- "column": "client_id",
876
- "references": {
877
- "table": "clients",
878
- "column": "client_id"
879
- }
880
- },
881
- {
882
- "column": "project_supervisor_id",
883
- "references": {
884
- "table": "users",
885
- "column": "user_id"
886
- }
887
- }
888
- ]
889
- },
890
- "client_communications": {
891
- "comment": "Stores records of communications with clients",
892
- "columns": [
893
- {
894
- "name": "client_id",
895
- "data_type": "integer",
896
- "comment": "Reference to the client"
897
- },
898
- {
899
- "name": "communication_date",
900
- "data_type": "timestamp without time zone",
901
- "comment": "Date and time when the communication occurred"
902
- },
903
- {
904
- "name": "user_id",
905
- "data_type": "integer",
906
- "comment": "Reference to the user who communicated with the client"
907
- },
908
- {
909
- "name": "communication_id",
910
- "data_type": "integer",
911
- "comment": "Unique internal communication ID"
912
- },
913
- {
914
- "name": "subject",
915
- "data_type": "character varying",
916
- "comment": "Subject of the communication"
917
- },
918
- {
919
- "name": "communication_type",
920
- "data_type": "character varying",
921
- "comment": "Type of communication (e.g., 'Email', 'Phone Call')"
922
- },
923
- {
924
- "name": "content",
925
- "data_type": "text",
926
- "comment": "Content or summary of the communication"
927
- }
928
- ],
929
- "foreign_keys": [
930
- {
931
- "column": "client_id",
932
- "references": {
933
- "table": "clients",
934
- "column": "client_id"
935
- }
936
- },
937
- {
938
- "column": "user_id",
939
- "references": {
940
- "table": "users",
941
- "column": "user_id"
942
- }
943
- }
944
- ]
945
- },
946
- "client_contact_persons": {
947
- "comment": "Stores contact person information for clients",
948
- "columns": [
949
- {
950
- "name": "contact_id",
951
- "data_type": "integer",
952
- "comment": "Unique internal contact person ID"
953
- },
954
- {
955
- "name": "client_id",
956
- "data_type": "integer",
957
- "comment": "Reference to the client"
958
- },
959
- {
960
- "name": "first_name",
961
- "data_type": "character varying",
962
- "comment": "First name of the contact person"
963
- },
964
- {
965
- "name": "surname",
966
- "data_type": "character varying",
967
- "comment": "Surname of the contact person"
968
- },
969
- {
970
- "name": "email",
971
- "data_type": "character varying",
972
- "comment": "Email address of the contact person"
973
- },
974
- {
975
- "name": "cellphone_number",
976
- "data_type": "character varying",
977
- "comment": "Cellphone number of the contact person"
978
- },
979
- {
980
- "name": "tel_number",
981
- "data_type": "character varying",
982
- "comment": "Landline number of the contact person"
983
- },
984
- {
985
- "name": "position",
986
- "data_type": "character varying",
987
- "comment": "Position or role of the contact person at the client company"
988
- }
989
- ],
990
- "foreign_keys": [
991
- {
992
- "column": "client_id",
993
- "references": {
994
- "table": "clients",
995
- "column": "client_id"
996
- }
997
- }
998
- ]
999
- },
1000
- "clients": {
1001
- "comment": "Stores information about clients (companies or organizations)",
1002
- "columns": [
1003
- {
1004
- "name": "client_id",
1005
- "data_type": "integer",
1006
- "comment": "Unique internal client ID"
1007
- },
1008
- {
1009
- "name": "branch_of",
1010
- "data_type": "integer",
1011
- "comment": "Reference to the parent client if this client is a branch"
1012
- },
1013
- {
1014
- "name": "town_id",
1015
- "data_type": "integer",
1016
- "comment": "Reference to the town where the client is located"
1017
- },
1018
- {
1019
- "name": "financial_year_end",
1020
- "data_type": "date",
1021
- "comment": "Date of the client's financial year-end"
1022
- },
1023
- {
1024
- "name": "bbbee_verification_date",
1025
- "data_type": "date",
1026
- "comment": "Date of the client's BBBEE verification"
1027
- },
1028
- {
1029
- "name": "created_at",
1030
- "data_type": "timestamp without time zone",
1031
- "comment": "Timestamp when the client record was created"
1032
- },
1033
- {
1034
- "name": "updated_at",
1035
- "data_type": "timestamp without time zone",
1036
- "comment": "Timestamp when the client record was last updated"
1037
- },
1038
- {
1039
- "name": "postal_code",
1040
- "data_type": "character varying",
1041
- "comment": "Postal code of the client's location"
1042
- },
1043
- {
1044
- "name": "client_name",
1045
- "data_type": "character varying",
1046
- "comment": "Name of the client company or organization"
1047
- },
1048
- {
1049
- "name": "seta",
1050
- "data_type": "character varying",
1051
- "comment": "SETA the client belongs to"
1052
- },
1053
- {
1054
- "name": "company_registration_number",
1055
- "data_type": "character varying",
1056
- "comment": "Company registration number of the client"
1057
- },
1058
- {
1059
- "name": "address_line",
1060
- "data_type": "character varying",
1061
- "comment": "Client's street address"
1062
- },
1063
- {
1064
- "name": "suburb",
1065
- "data_type": "character varying",
1066
- "comment": "Suburb where the client is located"
1067
- },
1068
- {
1069
- "name": "client_status",
1070
- "data_type": "character varying",
1071
- "comment": "Current status of the client (e.g., 'Active Client', 'Lost Client')"
1072
- }
1073
- ],
1074
- "foreign_keys": [
1075
- {
1076
- "column": "branch_of",
1077
- "references": {
1078
- "table": "clients",
1079
- "column": "client_id"
1080
- }
1081
- },
1082
- {
1083
- "column": "town_id",
1084
- "references": {
1085
- "table": "locations",
1086
- "column": "location_id"
1087
- }
1088
- }
1089
- ]
1090
- },
1091
- "collections": {
1092
- "comment": "Records collections made from classes",
1093
- "columns": [
1094
- {
1095
- "name": "created_at",
1096
- "data_type": "timestamp without time zone",
1097
- "comment": "Timestamp when the collection record was created"
1098
- },
1099
- {
1100
- "name": "updated_at",
1101
- "data_type": "timestamp without time zone",
1102
- "comment": "Timestamp when the collection record was last updated"
1103
- },
1104
- {
1105
- "name": "collection_date",
1106
- "data_type": "date",
1107
- "comment": "Date when the collection is scheduled or occurred"
1108
- },
1109
- {
1110
- "name": "collection_id",
1111
- "data_type": "integer",
1112
- "comment": "Unique internal collection ID"
1113
- },
1114
- {
1115
- "name": "class_id",
1116
- "data_type": "integer",
1117
- "comment": "Reference to the class"
1118
- },
1119
- {
1120
- "name": "items",
1121
- "data_type": "text",
1122
- "comment": "Items collected from the class"
1123
- },
1124
- {
1125
- "name": "status",
1126
- "data_type": "character varying",
1127
- "comment": "Collection status (e.g., 'Pending', 'Collected')"
1128
- }
1129
- ],
1130
- "foreign_keys": [
1131
- {
1132
- "column": "class_id",
1133
- "references": {
1134
- "table": "classes",
1135
- "column": "class_id"
1136
- }
1137
- }
1138
- ]
1139
- },
1140
- "deliveries": {
1141
- "comment": "Records deliveries made to classes",
1142
- "columns": [
1143
- {
1144
- "name": "created_at",
1145
- "data_type": "timestamp without time zone",
1146
- "comment": "Timestamp when the delivery record was created"
1147
- },
1148
- {
1149
- "name": "updated_at",
1150
- "data_type": "timestamp without time zone",
1151
- "comment": "Timestamp when the delivery record was last updated"
1152
- },
1153
- {
1154
- "name": "delivery_date",
1155
- "data_type": "date",
1156
- "comment": "Date when the delivery is scheduled or occurred"
1157
- },
1158
- {
1159
- "name": "delivery_id",
1160
- "data_type": "integer",
1161
- "comment": "Unique internal delivery ID"
1162
- },
1163
- {
1164
- "name": "class_id",
1165
- "data_type": "integer",
1166
- "comment": "Reference to the class"
1167
- },
1168
- {
1169
- "name": "items",
1170
- "data_type": "text",
1171
- "comment": "Items included in the delivery"
1172
- },
1173
- {
1174
- "name": "status",
1175
- "data_type": "character varying",
1176
- "comment": "Delivery status (e.g., 'Pending', 'Delivered')"
1177
- }
1178
- ],
1179
- "foreign_keys": [
1180
- {
1181
- "column": "class_id",
1182
- "references": {
1183
- "table": "classes",
1184
- "column": "class_id"
1185
- }
1186
- }
1187
- ]
1188
- },
1189
- "employers": {
1190
- "comment": "Stores information about employers or sponsors of learners",
1191
- "columns": [
1192
- {
1193
- "name": "employer_id",
1194
- "data_type": "integer",
1195
- "comment": "Unique internal employer ID"
1196
- },
1197
- {
1198
- "name": "created_at",
1199
- "data_type": "timestamp without time zone",
1200
- "comment": "Timestamp when the employer record was created"
1201
- },
1202
- {
1203
- "name": "updated_at",
1204
- "data_type": "timestamp without time zone",
1205
- "comment": "Timestamp when the employer record was last updated"
1206
- },
1207
- {
1208
- "name": "employer_name",
1209
- "data_type": "character varying",
1210
- "comment": "Name of the employer or sponsoring organization"
1211
- }
1212
- ],
1213
- "foreign_keys": []
1214
- },
1215
- "exam_results": {
1216
- "comment": "Stores detailed exam results for learners",
1217
- "columns": [
1218
- {
1219
- "name": "updated_at",
1220
- "data_type": "timestamp without time zone",
1221
- "comment": "Timestamp when the exam result was last updated"
1222
- },
1223
- {
1224
- "name": "exam_id",
1225
- "data_type": "integer",
1226
- "comment": "Reference to the exam"
1227
- },
1228
- {
1229
- "name": "learner_id",
1230
- "data_type": "integer",
1231
- "comment": "Reference to the learner"
1232
- },
1233
- {
1234
- "name": "created_at",
1235
- "data_type": "timestamp without time zone",
1236
- "comment": "Timestamp when the exam result was created"
1237
- },
1238
- {
1239
- "name": "result_id",
1240
- "data_type": "integer",
1241
- "comment": "Unique internal exam result ID"
1242
- },
1243
- {
1244
- "name": "mock_exam_number",
1245
- "data_type": "integer",
1246
- "comment": "Number of the mock exam (e.g., 1, 2, 3)"
1247
- },
1248
- {
1249
- "name": "score",
1250
- "data_type": "numeric",
1251
- "comment": "Learner's score in the exam"
1252
- },
1253
- {
1254
- "name": "exam_date",
1255
- "data_type": "date",
1256
- "comment": "Date when the exam was taken"
1257
- },
1258
- {
1259
- "name": "subject",
1260
- "data_type": "character varying",
1261
- "comment": "Subject of the exam"
1262
- },
1263
- {
1264
- "name": "result",
1265
- "data_type": "character varying",
1266
- "comment": "Exam result (e.g., 'Pass', 'Fail')"
1267
- }
1268
- ],
1269
- "foreign_keys": [
1270
- {
1271
- "column": "exam_id",
1272
- "references": {
1273
- "table": "exams",
1274
- "column": "exam_id"
1275
- }
1276
- },
1277
- {
1278
- "column": "learner_id",
1279
- "references": {
1280
- "table": "learners",
1281
- "column": "learner_id"
1282
- }
1283
- }
1284
- ]
1285
- },
1286
- "exams": {
1287
- "comment": "Stores exam results for learners",
1288
- "columns": [
1289
- {
1290
- "name": "exam_id",
1291
- "data_type": "integer",
1292
- "comment": "Unique internal exam ID"
1293
- },
1294
- {
1295
- "name": "learner_id",
1296
- "data_type": "integer",
1297
- "comment": "Reference to the learner"
1298
- },
1299
- {
1300
- "name": "product_id",
1301
- "data_type": "integer",
1302
- "comment": "Reference to the product or subject"
1303
- },
1304
- {
1305
- "name": "exam_date",
1306
- "data_type": "date",
1307
- "comment": "Date when the exam was taken"
1308
- },
1309
- {
1310
- "name": "created_at",
1311
- "data_type": "timestamp without time zone",
1312
- "comment": "Timestamp when the exam record was created"
1313
- },
1314
- {
1315
- "name": "updated_at",
1316
- "data_type": "timestamp without time zone",
1317
- "comment": "Timestamp when the exam record was last updated"
1318
- },
1319
- {
1320
- "name": "score",
1321
- "data_type": "numeric",
1322
- "comment": "Learner's score in the exam"
1323
- },
1324
- {
1325
- "name": "exam_type",
1326
- "data_type": "character varying",
1327
- "comment": "Type of exam (e.g., 'Mock', 'Final')"
1328
- },
1329
- {
1330
- "name": "result",
1331
- "data_type": "character varying",
1332
- "comment": "Exam result (e.g., 'Pass', 'Fail')"
1333
- }
1334
- ],
1335
- "foreign_keys": [
1336
- {
1337
- "column": "learner_id",
1338
- "references": {
1339
- "table": "learners",
1340
- "column": "learner_id"
1341
- }
1342
- },
1343
- {
1344
- "column": "product_id",
1345
- "references": {
1346
- "table": "products",
1347
- "column": "product_id"
1348
- }
1349
- }
1350
- ]
1351
- },
1352
- "files": {
1353
- "comment": "Stores references to files associated with various entities",
1354
- "columns": [
1355
- {
1356
- "name": "file_id",
1357
- "data_type": "integer",
1358
- "comment": "Unique internal file ID"
1359
- },
1360
- {
1361
- "name": "owner_id",
1362
- "data_type": "integer",
1363
- "comment": "ID of the owner entity"
1364
- },
1365
- {
1366
- "name": "uploaded_at",
1367
- "data_type": "timestamp without time zone",
1368
- "comment": "Timestamp when the file was uploaded"
1369
- },
1370
- {
1371
- "name": "owner_type",
1372
- "data_type": "character varying",
1373
- "comment": "Type of entity that owns the file (e.g., 'Learner', 'Class', 'Agent')"
1374
- },
1375
- {
1376
- "name": "file_path",
1377
- "data_type": "character varying",
1378
- "comment": "File path or URL to the stored file"
1379
- },
1380
- {
1381
- "name": "file_type",
1382
- "data_type": "character varying",
1383
- "comment": "Type of file (e.g., 'Scanned Portfolio', 'QA Report')"
1384
- }
1385
- ],
1386
- "foreign_keys": []
1387
- },
1388
- "history": {
1389
- "comment": "Records historical changes and actions performed on entities",
1390
- "columns": [
1391
- {
1392
- "name": "action_date",
1393
- "data_type": "timestamp without time zone",
1394
- "comment": "Timestamp when the action occurred"
1395
- },
1396
- {
1397
- "name": "user_id",
1398
- "data_type": "integer",
1399
- "comment": "Reference to the user who performed the action"
1400
- },
1401
- {
1402
- "name": "entity_id",
1403
- "data_type": "integer",
1404
- "comment": "ID of the entity"
1405
- },
1406
- {
1407
- "name": "history_id",
1408
- "data_type": "integer",
1409
- "comment": "Unique internal history ID"
1410
- },
1411
- {
1412
- "name": "changes",
1413
- "data_type": "jsonb",
1414
- "comment": "Details of the changes made, stored in JSON format"
1415
- },
1416
- {
1417
- "name": "action",
1418
- "data_type": "character varying",
1419
- "comment": "Type of action performed (e.g., 'Created', 'Updated', 'Deleted')"
1420
- },
1421
- {
1422
- "name": "entity_type",
1423
- "data_type": "character varying",
1424
- "comment": "Type of entity the history record refers to (e.g., 'Learner', 'Agent', 'Class')"
1425
- }
1426
- ],
1427
- "foreign_keys": [
1428
- {
1429
- "column": "user_id",
1430
- "references": {
1431
- "table": "users",
1432
- "column": "user_id"
1433
- }
1434
- }
1435
- ]
1436
- },
1437
- "learner_products": {
1438
- "comment": "Associates learners with the products they are enrolled in",
1439
- "columns": [
1440
- {
1441
- "name": "learner_id",
1442
- "data_type": "integer",
1443
- "comment": "Reference to the learner"
1444
- },
1445
- {
1446
- "name": "product_id",
1447
- "data_type": "integer",
1448
- "comment": "Reference to the product the learner is enrolled in"
1449
- },
1450
- {
1451
- "name": "start_date",
1452
- "data_type": "date",
1453
- "comment": "Start date of the learner's enrollment in the product"
1454
- },
1455
- {
1456
- "name": "end_date",
1457
- "data_type": "date",
1458
- "comment": "End date of the learner's enrollment in the product"
1459
- }
1460
- ],
1461
- "foreign_keys": [
1462
- {
1463
- "column": "learner_id",
1464
- "references": {
1465
- "table": "learners",
1466
- "column": "learner_id"
1467
- }
1468
- },
1469
- {
1470
- "column": "product_id",
1471
- "references": {
1472
- "table": "products",
1473
- "column": "product_id"
1474
- }
1475
- }
1476
- ]
1477
- },
1478
- "learner_progressions": {
1479
- "comment": "Tracks the progression of learners between products",
1480
- "columns": [
1481
- {
1482
- "name": "progression_id",
1483
- "data_type": "integer",
1484
- "comment": "Unique internal progression ID"
1485
- },
1486
- {
1487
- "name": "learner_id",
1488
- "data_type": "integer",
1489
- "comment": "Reference to the learner"
1490
- },
1491
- {
1492
- "name": "from_product_id",
1493
- "data_type": "integer",
1494
- "comment": "Reference to the initial product"
1495
- },
1496
- {
1497
- "name": "to_product_id",
1498
- "data_type": "integer",
1499
- "comment": "Reference to the new product after progression"
1500
- },
1501
- {
1502
- "name": "progression_date",
1503
- "data_type": "date",
1504
- "comment": "Date when the learner progressed to the new product"
1505
- },
1506
- {
1507
- "name": "notes",
1508
- "data_type": "text",
1509
- "comment": "Additional notes regarding the progression"
1510
- }
1511
- ],
1512
- "foreign_keys": [
1513
- {
1514
- "column": "from_product_id",
1515
- "references": {
1516
- "table": "products",
1517
- "column": "product_id"
1518
- }
1519
- },
1520
- {
1521
- "column": "learner_id",
1522
- "references": {
1523
- "table": "learners",
1524
- "column": "learner_id"
1525
- }
1526
- },
1527
- {
1528
- "column": "to_product_id",
1529
- "references": {
1530
- "table": "products",
1531
- "column": "product_id"
1532
- }
1533
- }
1534
- ]
1535
- },
1536
- "learners": {
1537
- "comment": "Stores personal, educational, and assessment information about learners",
1538
- "columns": [
1539
- {
1540
- "name": "updated_at",
1541
- "data_type": "timestamp without time zone",
1542
- "comment": "Timestamp when the learner record was last updated"
1543
- },
1544
- {
1545
- "name": "city_town_id",
1546
- "data_type": "integer",
1547
- "comment": "Reference to the city or town where the learner lives"
1548
- },
1549
- {
1550
- "name": "province_region_id",
1551
- "data_type": "integer",
1552
- "comment": "Reference to the province/region where the learner lives"
1553
- },
1554
- {
1555
- "name": "date_loaded",
1556
- "data_type": "date",
1557
- "comment": "Date when the learner was added to the system"
1558
- },
1559
- {
1560
- "name": "placement_assessment_date",
1561
- "data_type": "date",
1562
- "comment": "Date when the learner took the placement assessment"
1563
- },
1564
- {
1565
- "name": "employment_status",
1566
- "data_type": "boolean",
1567
- "comment": "Indicates if the learner is employed (true) or not (false)"
1568
- },
1569
- {
1570
- "name": "employer_id",
1571
- "data_type": "integer",
1572
- "comment": "Reference to the learner's employer or sponsor"
1573
- },
1574
- {
1575
- "name": "disability_status",
1576
- "data_type": "boolean",
1577
- "comment": "Indicates if the learner has a disability (true) or not (false)"
1578
- },
1579
- {
1580
- "name": "created_at",
1581
- "data_type": "timestamp without time zone",
1582
- "comment": "Timestamp when the learner record was created"
1583
- },
1584
- {
1585
- "name": "learner_id",
1586
- "data_type": "integer",
1587
- "comment": "Unique internal learner ID"
1588
- },
1589
- {
1590
- "name": "email_address",
1591
- "data_type": "character varying",
1592
- "comment": "Learner's email address"
1593
- },
1594
- {
1595
- "name": "address_line_1",
1596
- "data_type": "character varying",
1597
- "comment": "First line of learner's physical address"
1598
- },
1599
- {
1600
- "name": "address_line_2",
1601
- "data_type": "character varying",
1602
- "comment": "Second line of learner's physical address"
1603
- },
1604
- {
1605
- "name": "scanned_portfolio",
1606
- "data_type": "character varying",
1607
- "comment": "File path or URL to the learner's scanned portfolio in PDF format"
1608
- },
1609
- {
1610
- "name": "placement_level_communications",
1611
- "data_type": "character varying",
1612
- "comment": "Learner's initial placement level in Communications (e.g., 'CL1b', 'CL1', 'CL2')"
1613
- },
1614
- {
1615
- "name": "postal_code",
1616
- "data_type": "character varying",
1617
- "comment": "Postal code of the learner's area"
1618
- },
1619
- {
1620
- "name": "highest_qualification",
1621
- "data_type": "character varying",
1622
- "comment": "Highest qualification the learner has achieved"
1623
- },
1624
- {
1625
- "name": "placement_level_mathematics",
1626
- "data_type": "character varying",
1627
- "comment": "Learner's initial placement level in Mathematics (e.g., 'ML1', 'ML2', 'ML3')"
1628
- },
1629
- {
1630
- "name": "assessment_status",
1631
- "data_type": "character varying",
1632
- "comment": "Assessment status; indicates if the learner was assessed ('Assessed', 'Not Assessed')"
1633
- },
1634
- {
1635
- "name": "first_name",
1636
- "data_type": "character varying",
1637
- "comment": "Learner's first name"
1638
- },
1639
- {
1640
- "name": "initials",
1641
- "data_type": "character varying",
1642
- "comment": "Learner's initials"
1643
- },
1644
- {
1645
- "name": "surname",
1646
- "data_type": "character varying",
1647
- "comment": "Learner's surname"
1648
- },
1649
- {
1650
- "name": "gender",
1651
- "data_type": "character varying",
1652
- "comment": "Learner's gender"
1653
- },
1654
- {
1655
- "name": "race",
1656
- "data_type": "character varying",
1657
- "comment": "Learner's race; options include 'African', 'Coloured', 'White', 'Indian'"
1658
- },
1659
- {
1660
- "name": "sa_id_no",
1661
- "data_type": "character varying",
1662
- "comment": "Learner's South African ID number"
1663
- },
1664
- {
1665
- "name": "passport_number",
1666
- "data_type": "character varying",
1667
- "comment": "Learner's passport number if they are a foreigner"
1668
- },
1669
- {
1670
- "name": "tel_number",
1671
- "data_type": "character varying",
1672
- "comment": "Learner's primary telephone number"
1673
- },
1674
- {
1675
- "name": "alternative_tel_number",
1676
- "data_type": "character varying",
1677
- "comment": "Learner's alternative contact number"
1678
- }
1679
- ],
1680
- "foreign_keys": [
1681
- {
1682
- "column": "city_town_id",
1683
- "references": {
1684
- "table": "locations",
1685
- "column": "location_id"
1686
- }
1687
- },
1688
- {
1689
- "column": "employer_id",
1690
- "references": {
1691
- "table": "employers",
1692
- "column": "employer_id"
1693
- }
1694
- },
1695
- {
1696
- "column": "province_region_id",
1697
- "references": {
1698
- "table": "locations",
1699
- "column": "location_id"
1700
- }
1701
- }
1702
- ]
1703
- },
1704
- "locations": {
1705
- "comment": "Stores geographical location data for addresses",
1706
- "columns": [
1707
- {
1708
- "name": "location_id",
1709
- "data_type": "integer",
1710
- "comment": "Unique internal location ID"
1711
- },
1712
- {
1713
- "name": "longitude",
1714
- "data_type": "numeric",
1715
- "comment": "Geographical longitude coordinate"
1716
- },
1717
- {
1718
- "name": "latitude",
1719
- "data_type": "numeric",
1720
- "comment": "Geographical latitude coordinate"
1721
- },
1722
- {
1723
- "name": "created_at",
1724
- "data_type": "timestamp without time zone",
1725
- "comment": "Timestamp when the location record was created"
1726
- },
1727
- {
1728
- "name": "updated_at",
1729
- "data_type": "timestamp without time zone",
1730
- "comment": "Timestamp when the location record was last updated"
1731
- },
1732
- {
1733
- "name": "suburb",
1734
- "data_type": "character varying",
1735
- "comment": "Suburb name"
1736
- },
1737
- {
1738
- "name": "town",
1739
- "data_type": "character varying",
1740
- "comment": "Town name"
1741
- },
1742
- {
1743
- "name": "province",
1744
- "data_type": "character varying",
1745
- "comment": "Province name"
1746
- },
1747
- {
1748
- "name": "postal_code",
1749
- "data_type": "character varying",
1750
- "comment": "Postal code"
1751
- }
1752
- ],
1753
- "foreign_keys": []
1754
- },
1755
- "products": {
1756
- "comment": "Stores information about educational products or courses",
1757
- "columns": [
1758
- {
1759
- "name": "product_id",
1760
- "data_type": "integer",
1761
- "comment": "Unique internal product ID"
1762
- },
1763
- {
1764
- "name": "product_duration",
1765
- "data_type": "integer",
1766
- "comment": "Total duration of the product in hours"
1767
- },
1768
- {
1769
- "name": "learning_area_duration",
1770
- "data_type": "integer",
1771
- "comment": "Duration of each learning area in hours"
1772
- },
1773
- {
1774
- "name": "parent_product_id",
1775
- "data_type": "integer",
1776
- "comment": "Reference to a parent product for hierarchical structuring"
1777
- },
1778
- {
1779
- "name": "created_at",
1780
- "data_type": "timestamp without time zone",
1781
- "comment": "Timestamp when the product record was created"
1782
- },
1783
- {
1784
- "name": "updated_at",
1785
- "data_type": "timestamp without time zone",
1786
- "comment": "Timestamp when the product record was last updated"
1787
- },
1788
- {
1789
- "name": "product_notes",
1790
- "data_type": "text",
1791
- "comment": "Notes or additional information about the product"
1792
- },
1793
- {
1794
- "name": "product_name",
1795
- "data_type": "character varying",
1796
- "comment": "Name of the product or course"
1797
- },
1798
- {
1799
- "name": "product_rules",
1800
- "data_type": "text",
1801
- "comment": "Rules or guidelines associated with the product"
1802
- },
1803
- {
1804
- "name": "learning_area",
1805
- "data_type": "character varying",
1806
- "comment": "Learning areas covered by the product (e.g., 'Communication', 'Numeracy')"
1807
- },
1808
- {
1809
- "name": "product_flags",
1810
- "data_type": "text",
1811
- "comment": "Flags or alerts for the product (e.g., attendance thresholds)"
1812
- },
1813
- {
1814
- "name": "reporting_structure",
1815
- "data_type": "text",
1816
- "comment": "Structure of progress reports for the product"
1817
- }
1818
- ],
1819
- "foreign_keys": [
1820
- {
1821
- "column": "parent_product_id",
1822
- "references": {
1823
- "table": "products",
1824
- "column": "product_id"
1825
- }
1826
- }
1827
- ]
1828
- },
1829
- "progress_reports": {
1830
- "comment": "Stores progress reports for learners in specific classes and products",
1831
- "columns": [
1832
- {
1833
- "name": "updated_at",
1834
- "data_type": "timestamp without time zone",
1835
- "comment": "Timestamp when the progress report was last updated"
1836
- },
1837
- {
1838
- "name": "class_id",
1839
- "data_type": "integer",
1840
- "comment": "Reference to the class"
1841
- },
1842
- {
1843
- "name": "learner_id",
1844
- "data_type": "integer",
1845
- "comment": "Reference to the learner"
1846
- },
1847
- {
1848
- "name": "product_id",
1849
- "data_type": "integer",
1850
- "comment": "Reference to the product or subject"
1851
- },
1852
- {
1853
- "name": "progress_percentage",
1854
- "data_type": "numeric",
1855
- "comment": "Learner's progress percentage in the product"
1856
- },
1857
- {
1858
- "name": "report_date",
1859
- "data_type": "date",
1860
- "comment": "Date when the progress report was generated"
1861
- },
1862
- {
1863
- "name": "report_id",
1864
- "data_type": "integer",
1865
- "comment": "Unique internal progress report ID"
1866
- },
1867
- {
1868
- "name": "created_at",
1869
- "data_type": "timestamp without time zone",
1870
- "comment": "Timestamp when the progress report was created"
1871
- },
1872
- {
1873
- "name": "remarks",
1874
- "data_type": "text",
1875
- "comment": "Additional remarks or comments"
1876
- }
1877
- ],
1878
- "foreign_keys": [
1879
- {
1880
- "column": "class_id",
1881
- "references": {
1882
- "table": "classes",
1883
- "column": "class_id"
1884
- }
1885
- },
1886
- {
1887
- "column": "learner_id",
1888
- "references": {
1889
- "table": "learners",
1890
- "column": "learner_id"
1891
- }
1892
- },
1893
- {
1894
- "column": "product_id",
1895
- "references": {
1896
- "table": "products",
1897
- "column": "product_id"
1898
- }
1899
- }
1900
- ]
1901
- },
1902
- "qa_reports": {
1903
- "comment": "Stores QA (Quality Assurance) reports for classes and agents",
1904
- "columns": [
1905
- {
1906
- "name": "qa_report_id",
1907
- "data_type": "integer",
1908
- "comment": "Unique internal QA report ID"
1909
- },
1910
- {
1911
- "name": "class_id",
1912
- "data_type": "integer",
1913
- "comment": "Reference to the class"
1914
- },
1915
- {
1916
- "name": "agent_id",
1917
- "data_type": "integer",
1918
- "comment": "Reference to the agent"
1919
- },
1920
- {
1921
- "name": "report_date",
1922
- "data_type": "date",
1923
- "comment": "Date when the QA report was created"
1924
- },
1925
- {
1926
- "name": "created_at",
1927
- "data_type": "timestamp without time zone",
1928
- "comment": "Timestamp when the QA report was created"
1929
- },
1930
- {
1931
- "name": "updated_at",
1932
- "data_type": "timestamp without time zone",
1933
- "comment": "Timestamp when the QA report was last updated"
1934
- },
1935
- {
1936
- "name": "report_file",
1937
- "data_type": "character varying",
1938
- "comment": "File path or URL to the QA report"
1939
- },
1940
- {
1941
- "name": "notes",
1942
- "data_type": "text",
1943
- "comment": "Additional notes or observations from the QA report"
1944
- }
1945
- ],
1946
- "foreign_keys": [
1947
- {
1948
- "column": "agent_id",
1949
- "references": {
1950
- "table": "agents",
1951
- "column": "agent_id"
1952
- }
1953
- },
1954
- {
1955
- "column": "class_id",
1956
- "references": {
1957
- "table": "classes",
1958
- "column": "class_id"
1959
- }
1960
- }
1961
- ]
1962
- },
1963
- "user_permissions": {
1964
- "comment": "Grants specific permissions to users",
1965
- "columns": [
1966
- {
1967
- "name": "permission_id",
1968
- "data_type": "integer",
1969
- "comment": "Unique internal permission ID"
1970
- },
1971
- {
1972
- "name": "user_id",
1973
- "data_type": "integer",
1974
- "comment": "Reference to the user"
1975
- },
1976
- {
1977
- "name": "permission",
1978
- "data_type": "character varying",
1979
- "comment": "Specific permission granted to the user"
1980
- }
1981
- ],
1982
- "foreign_keys": [
1983
- {
1984
- "column": "user_id",
1985
- "references": {
1986
- "table": "users",
1987
- "column": "user_id"
1988
- }
1989
- }
1990
- ]
1991
- },
1992
- "user_roles": {
1993
- "comment": "Defines roles and associated permissions for users",
1994
- "columns": [
1995
- {
1996
- "name": "role_id",
1997
- "data_type": "integer",
1998
- "comment": "Unique internal role ID"
1999
- },
2000
- {
2001
- "name": "permissions",
2002
- "data_type": "jsonb",
2003
- "comment": "Permissions associated with the role, stored in JSON format"
2004
- },
2005
- {
2006
- "name": "role_name",
2007
- "data_type": "character varying",
2008
- "comment": "Name of the role (e.g., 'Admin', 'Project Supervisor')"
2009
- }
2010
- ],
2011
- "foreign_keys": []
2012
- },
2013
- "users": {
2014
- "comment": "Stores system user information",
2015
- "columns": [
2016
- {
2017
- "name": "user_id",
2018
- "data_type": "integer",
2019
- "comment": "Unique internal user ID"
2020
- },
2021
- {
2022
- "name": "created_at",
2023
- "data_type": "timestamp without time zone",
2024
- "comment": "Timestamp when the user record was created"
2025
- },
2026
- {
2027
- "name": "updated_at",
2028
- "data_type": "timestamp without time zone",
2029
- "comment": "Timestamp when the user record was last updated"
2030
- },
2031
- {
2032
- "name": "email",
2033
- "data_type": "character varying",
2034
- "comment": "User's email address"
2035
- },
2036
- {
2037
- "name": "cellphone_number",
2038
- "data_type": "character varying",
2039
- "comment": "User's cellphone number"
2040
- },
2041
- {
2042
- "name": "role",
2043
- "data_type": "character varying",
2044
- "comment": "User's role in the system, e.g., 'Admin', 'Project Supervisor'"
2045
- },
2046
- {
2047
- "name": "password_hash",
2048
- "data_type": "character varying",
2049
- "comment": "Hashed password for user authentication"
2050
- },
2051
- {
2052
- "name": "first_name",
2053
- "data_type": "character varying",
2054
- "comment": "User's first name"
2055
- },
2056
- {
2057
- "name": "surname",
2058
- "data_type": "character varying",
2059
- "comment": "User's surname"
2060
- }
2061
- ],
2062
- "foreign_keys": []
2063
- }
2064
- }