diff options
| author | 2026-11-07 06:12:48 +0000 | |
|---|---|---|
| committer | 2026-11-07 06:21:22 +0000 | |
| commit | 39dcac2281970febcce36a0151796af2986388b3 (patch) | |
| tree | 7339e54dc942a3ab0d9ba9daae56a2801c1917e9 /src/schema.h | |
| download | coursework-master.tar.gz | |
Diffstat (limited to 'src/schema.h')
| -rw-r--r-- | src/schema.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/schema.h b/src/schema.h new file mode 100644 index 0000000..6570e31 --- /dev/null +++ b/src/schema.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef INCLUDED_SCHEMA_H | ||
| 2 | #define INCLUDED_SCHEMA_H | ||
| 3 | |||
| 4 | #define SCHEMA_GROUP_COUNT 300 | ||
| 5 | #define SCHEMA_SUBJECT_COUNT 9 | ||
| 6 | #define SCHEMA_TEACHER_COUNT 100 | ||
| 7 | #define SCHEMA_LAB_ASSIGNMENT_PER_GROUP_MIN_COUNT 15 | ||
| 8 | #define SCHEMA_LAB_ASSIGNMENT_PER_GROUP_MAX_COUNT 25 | ||
| 9 | #define SCHEMA_LAB_PER_SUBJECT_MIN_COUNT 30 | ||
| 10 | #define SCHEMA_LAB_PER_SUBJECT_MAX_COUNT 100 | ||
| 11 | #define SCHEMA_STUDENT_PER_GROUP_MIN_COUNT 15 | ||
| 12 | #define SCHEMA_STUDENT_PER_GROUP_MAX_COUNT 30 | ||
| 13 | #define SCHEMA_TEACHER_PER_LAB_ASSIGNMENT_MIN_COUNT 1 | ||
| 14 | #define SCHEMA_TEACHER_PER_LAB_ASSIGNMENT_MAX_COUNT 5 | ||
| 15 | #define SCHEMA_STUDENT_PER_LAB_MIN_COUNT 0 | ||
| 16 | #define SCHEMA_STUDENT_PER_LAB_MAX_COUNT 3 | ||
| 17 | |||
| 18 | enum tables { | ||
| 19 | TABLE_TEACHERS, | ||
| 20 | TABLE_SUBJECTS, | ||
| 21 | TABLE_GROUPS, | ||
| 22 | TABLE_STUDENTS, | ||
| 23 | TABLE_LABS, | ||
| 24 | TABLE_LAB_ASSIGNMENTS, | ||
| 25 | TABLE_LAB_ASSIGNMENTS_TEACHERS, | ||
| 26 | TABLE_STUDENTS_LAB_ASSIGNMENTS, | ||
| 27 | TABLE_COUNT | ||
| 28 | }; | ||
| 29 | |||
| 30 | extern void drop_schema(void); | ||
| 31 | extern void create_schema (void); | ||
| 32 | extern void generate_tables(void); | ||
| 33 | extern void describe_schema (void); | ||
| 34 | |||
| 35 | #endif | ||
