Overview
TheClase (Class) model represents scheduled riding lessons at the equestrian school. Classes connect students, instructors, and horses for a specific time slot and specialty.
Data Model
Unique identifier for the class
Type of riding class specialtyPossible values:
"EQUITACION"- Regular riding class"ADIESTRAMIENTO"- Horse training class"EQUINOTERAPIA"- Equine therapy class"MONTA"- Free riding (automatically assigns placeholder student ID 1)
Date of the class in ISO format (yyyy-MM-dd)Example:
"2024-03-15"Start time of the class in 24-hour format (HH:mm)Example:
"14:30"Constraint: Classes cannot end after 18:30Duration of the class in minutesValid values:
30 or 60Default: 30Current state of the classPossible values:
"PROGRAMADA"- Scheduled, pending"INICIADA"- In progress"COMPLETADA"- Finished successfully"CANCELADA"- Cancelled"ACA"- Absence with notice (student notified they won’t attend)"ASA"- Absence without notice (student didn’t show up)
"PROGRAMADA"See Class States for more details.Optional notes or comments about the class
ID of the student attending the classSet to
null for trial classes with new people (uses personaPruebaId instead)Note: For specialty "MONTA", this is automatically set to ID 1 (placeholder student)ID of the trial person (for trial classes with new individuals)Only used when
esPrueba: true and the person is not a registered studentID of the instructor teaching the class
ID of the horse used in the class
Computed field combining date and timeExample:
"2024-03-15T14:30:00"Indicates if this is a trial classDefault:
falseTrial class rules:- Does not count toward the student’s monthly quota
- Only available for inactive students or new people
- Cannot be repeated for the same specialty
- Identified with 🎓 emoji and orange border in calendar
First name of trial person (when
esPrueba: true and person is not a registered student)Last name of trial person (when
esPrueba: true and person is not a registered student)Computed full name of trial personExample:
"María González"Extended Model: ClaseDetallada
TheClaseDetallada interface extends Clase with populated references:
Full student object (expanded from
alumnoId)Full trial person object (expanded from
personaPruebaId)Full instructor object (expanded from
instructorId)Full horse object (expanded from
caballoId)Example
Regular Class
Trial Class
Class States and Transitions
| State | Color | Description | Can Edit? |
|---|---|---|---|
| PROGRAMADA | 🟠 Orange | Scheduled, pending | ✅ Yes |
| INICIADA | 🔵 Blue | In progress | ❌ No |
| COMPLETADA | 🟢 Green | Finished successfully | ❌ No |
| CANCELADA | 🔴 Red | Cancelled | ❌ No |
| ACA | 🟣 Purple | Absence with notice | ❌ No |
| ASA | 🌸 Pink | Absence without notice | ❌ No |
INICIADA, COMPLETADA, or CANCELADA cannot be edited as they represent historical records.
Related Models
- Student (Alumno) - Students attending classes
- Instructor - Instructors teaching classes
- Horse (Caballo) - Horses used in classes
- Class States - Enumeration of class states
- Specialties - Types of class specialties
Business Rules
Time Constraints
- Classes cannot end after 18:30
- Time slots are in 30-minute increments (09:00 - 18:30)
- 60-minute classes occupy two consecutive 30-minute slots
Trial Classes
- Only for inactive students or new people
- Cannot be repeated for the same specialty
- Do not count toward monthly quota
- Student cannot have trial class if they already have classes in that specialty
Editing Restrictions
- Cannot edit classes with state
INICIADA,COMPLETADA, orCANCELADA - Delete and edit buttons are disabled for finalized classes
Schedule Conflicts
- Horse cannot have overlapping classes
- Instructor cannot have overlapping classes
- System shows warning indicators (⚠️) for conflicts
Specialty Rules
"MONTA"specialty automatically assigns placeholder student (ID 1)- Each specialty can have different trial class eligibility