Teachers (profesores) are the teaching staff managed by the school director. Each teacher has a unique teacher code (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/andrespaul123/micole-flutter/llms.txt
Use this file to discover all available pages before exploring further.
codigo_profesor) and an optional specialty field that describes their area of expertise. Once created, a teacher can be assigned to one or more subjects and then given schedule slots that define when and where each class takes place during an academic period.
The Profesor Model
Every teacher record is returned from the API nested under auser object for the identity fields (name, email) and a top-level profesor object for the school-specific fields.
| Field | Type | Description |
|---|---|---|
id | int | Primary key, auto-assigned |
name | string | Full name (from the linked user account) |
email | string | Login e-mail (from the linked user account) |
codigo_profesor | string | Unique teacher code used in timetables and reports |
especialidad | string? | Optional specialty or subject area |
Repository Methods
TheProfesorRepository class handles all HTTP communication with the API. Every method uses the injected Dio client and the /profesores resource path.
List Teachers
GET /api/profesoresReturns the full list of teachers for the current tenant.Create Teacher
POST /api/profesoresCreates a new teacher and their linked user account in a single request.Get Teacher
GET /api/profesores/:idFetches a single teacher record by its numeric ID.Update Teacher
PUT /api/profesores/:idUpdates the teacher’s profile. Omit password to keep the existing one.Delete Teacher
DELETE /api/profesores/:idPermanently removes the teacher and their user account.Assign Subject
POST /api/profesores/asignar-materiaLinks a subject to a teacher so the subject appears in schedule assignment screens.Get Teacher Subjects
GET /api/profesores/:id/subjectsReturns the list of subjects currently assigned to a teacher.createProfesor
Full name of the teacher.
Login e-mail address. Must be unique across the tenant.
Initial password for the teacher’s user account. Only required on creation.
Unique teacher code used to identify the teacher in timetables and reports.
Optional specialty or subject area (e.g. “Matemáticas”, “Ciencias Naturales”).
updateProfesor
Numeric ID of the teacher record to update.
Updated full name of the teacher.
Updated login e-mail address.
Updated unique teacher code.
New password. Pass
null to leave the existing password unchanged.Updated specialty or subject area. Pass
null to clear the field.asignarMateria
ID of the teacher to assign the subject to.
ID of the subject to assign.
Schedule Assignment Flow
Scheduling a teacher involves two distinct steps. The first step links the teacher to a subject; the second step places that linked class into a specific time slot within an academic period.Assign a subject to the teacher
Navigate to the teacher’s profile and tap the Assign Subject action. Select the subject from the list of available subjects for the tenant and confirm. This calls
POST /api/profesores/asignar-materia.Create a schedule assignment
Navigate to the teacher’s schedule screen (
/profesores/:id/horario) and fill in the period, course, section, day, start time, and end time. This calls POST /api/periodos/:periodoId/asignaciones with a horarios array.Application Routes
| Route | Screen | Description |
|---|---|---|
/profesores | ProfesorListScreen | Paginated list of all teachers |
/profesores/create | ProfesorCreateScreen | Form to create a new teacher |
/profesores/:id/edit | ProfesorEditScreen | Form to edit an existing teacher |
/profesores/:id/materia | AsignarMateriaScreen | Assign a subject to the teacher |
/profesores/:id/horario | AsignarHorarioScreen | Add schedule slots for the teacher |
/profesores/:id/ver-horario | HorarioProfesorScreen | Read-only weekly timetable view |
/profesores/:id/materias-asignadas | MateriasAsignadasScreen | List of subjects currently assigned |
/mis-clases | MisClasesScreen | Teacher’s own view of all assigned classes by period |
Deleting a teacher is irreversible. The associated user account and all schedule assignments linked to that teacher are removed from the tenant. Back up the data or reassign schedule slots before confirming deletion.