Overview
TheCaballo (Horse) model represents both school horses and privately-owned horses in the system. Horses can be assigned to classes and may have one or more owner associations.
Data Model
Unique identifier for the horse
Name of the horseExample:
"Thunder", "Luna"Type of horse ownershipPossible values:
"ESCUELA"- School horse, available for all students"PRIVADO"- Private horse, belongs to a specific student
Indicates if the horse is available for classesDefault:
trueHorses marked as not available cannot be assigned to new classes.Array of students associated with this horseCan include:
- Owners: Students who own private horses (
tipoPension: "CABALLO_PROPIO") - Reservations: Students who reserve school horses (
tipoPension: "RESERVA_ESCUELA")
Example
School Horse
Private Horse
Horse Types
School Horses (ESCUELA)
- Owned by the equestrian school
- Available for all students
- Can be reserved by students with
tipoPension: "RESERVA_ESCUELA" - Can be assigned to students without a specific horse (
tipoPension: "SIN_CABALLO") on a per-class basis
Private Horses (PRIVADO)
- Owned by individual students
- Can only be used by their owners
- Associated with students who have
tipoPension: "CABALLO_PROPIO" - System enforces ownership validation when assigning to classes
Related Models
- Student (Alumno) - Students who own or reserve horses
- Class (Clase) - Classes where horses are used
- Horse Types - Enumeration of horse types
- Board Types - Student board arrangements
Business Rules
- Private horses can only be assigned to classes with their owner
- School horses can be assigned to any student
- Horses cannot have overlapping class schedules (schedule conflict validation)
- Students with
tipoPension: "RESERVA_ESCUELA"can reserve a specific school horse - Students with
tipoPension: "CABALLO_PROPIO"must have a private horse assigned - Students with
tipoPension: "SIN_CABALLO"are assigned an available school horse per class - Horses marked as not available cannot be assigned to new classes
Calendar Visualization
In the calendar day view:- Each horse has its own column
- Horse columns are color-coded by type:
- Blue header: School horses (
ESCUELA) - Gold header: Private horses (
PRIVADO)
- Blue header: School horses (
- Columns show all classes scheduled for each horse
- Visual indicators (⚠️) appear when there are schedule conflicts