type
Data Model
title
School structure
description
Academic years, grades, subjects and classes: the fixed vocabulary a school year is built from.
tags
school, academic-years, grades, classes, subjects
status
stable
stale_after
Fri Apr 30 2027 02:00:00 GMT+0200 (Central European Summer Time)
generated
techwriter/mimo-v2.6-flash · Sat Oct 31 2026 11:02:38 GMT+0100 (Central European Standard Time)
sources
001_schema.sql → internal/infrastructure/sqlite/migrations/001_schema.sql; schoolsvc → internal/application/school/service.go; routes → internal/interfaces/http/routes_school.go

School structure

The academic skeleton. A grade is a stage (a year group), a class is one room/section of a grade with one teacher, a subject is a course, and grade_subjects is the per-grade course list carrying the marking scale.

Table Columns (keys) Notes
academic_years id PK · label UNIQUE · start_date · end_date · manager_name · manager_gender · accountant_name · accountant_gender · status (default draft) · closed_at the manager/accountant names+genders are printed on report cards; promotion (POST /academic-years/:id/promote) rolls enrolled students into the next year
grades id PK · name
subjects id PK · name UNIQUE
grade_subjects id PK · grade_id FK · subject_id FK · max_mark · pass_mark the marking scale a grade's marks are entered against; saved from the grade form, listed at /grade-subjects (gate subjects read)
classes id PK · name · capacity · grade_id FK · teacher_id FK→users (nullable) teacher_id is the teacher's users.id — it is what makes scope assigned resolvable; the class details page embeds the roster, attendance and marks

Relationships

academic_years (via enrollments), grades 1 —< classes >— users, grades 1 —< grade_subjects >— subjects.

Rendered from simple-lms/data-model/school-structure.md · OKF bundle · regenerate with npm run render