Overview
TheInstructor model represents teaching staff at the equestrian school. Instructors are assigned to classes and have a unique color for visual identification in the calendar.
Data Model
Unique identifier for the instructor
National identification number (DNI). Only numbers without dots or dashes.Validation: Must be unique across all instructors. The system validates for duplicates in real-time when entering 9 or more digits.Example:
"12345678"Instructor’s first name(s)
Instructor’s last name(s)
Date of birth in ISO format (yyyy-MM-dd)Example:
"1985-03-20"Phone area code. The system automatically adds the
+549 prefix for Argentine numbers.Example: "221"Phone number without the leading 0 or 15Example:
"1234567"Note: Combined with codigoArea, the full format becomes +549{codigoArea}{telefono}Email address (optional but recommended for communications)
Indicates if the instructor is currently activeDefault:
trueOnly active instructors can be assigned to new classes.Color assigned to the instructor for visual identification in the calendarAvailable colors: 7 predefined colorsUsed to:
- Distinguish classes in the calendar view
- Color-code cells in day view
- Identify instructor assignments at a glance
"#3B82F6" (blue)Example
Visual Identification
Calendar Display
In the calendar views, instructor colors are used to:- Background color: Each class cell displays the instructor’s color (lightened for readability)
- Quick identification: Users can instantly see which instructor is assigned to each class
- Legends: Color legends show instructor names with their corresponding colors
Available Colors
The system provides 7 predefined colors for instructor assignment:- Blue (
#3B82F6) - Green (
#10B981) - Red (
#EF4444) - Yellow (
#F59E0B) - Purple (
#8B5CF6) - Pink (
#EC4899) - Indigo (
#6366F1)
Related Models
- Class (Clase) - Classes taught by the instructor
- Specialties - Types of classes instructors can teach
Business Rules
- DNI must be unique across all instructors (validated in real-time)
- Phone numbers are automatically formatted with
+549prefix - Instructors are automatically set as active upon registration
- Only active instructors can be assigned to new classes
- Each instructor must have a unique color for calendar visualization
- Instructors cannot have overlapping class schedules (schedule conflict validation)