Skip to main content

Overview

The Alumno (Student) model represents individuals enrolled in the equestrian school. Students can take riding classes, own or reserve horses, and have different monthly class plans.

Data Model

id
number
required
Unique identifier for the student
dni
string
required
National identification number (DNI). Only numbers without dots or dashes.Validation: Must be unique across all students. The system validates for duplicates in real-time when entering 9 or more digits.Example: "12345678"
nombre
string
required
Student’s first name(s)
apellido
string
required
Student’s last name(s)
fechaNacimiento
string
required
Date of birth in ISO format (yyyy-MM-dd)Used for age calculation and insurance purposes.Example: "1995-06-15"
codigoArea
string
required
Phone area code. The system automatically adds the +549 prefix for Argentine numbers.Example: "221"
telefono
string
required
Phone number without the leading 0 or 15Example: "1234567"Note: Combined with codigoArea, the full format becomes +549{codigoArea}{telefono}
email
string
Email address (optional but recommended for communications)
fechaInscripcion
string
required
Registration date in ISO format (yyyy-MM-dd)Automatically set to the current date when creating a new student.
cantidadClases
number
required
Number of classes contracted per monthValid values: 4, 8, 12, or 16
propietario
boolean
required
Indicates if the student owns a private horseDefault: false
activo
boolean
required
Indicates if the student is currently activeDefault: trueNote: Inactive students cannot take regular classes but may be eligible for trial classes.
caballoPropio
number | Caballo
Reference to the student’s own horse (if tipoPension is "CABALLO_PROPIO") or reserved school horse (if tipoPension is "RESERVA_ESCUELA")Can be either:
  • A horse ID (number)
  • A full Horse object with expanded data
tipoPension
TipoPension
required
Type of board/horse arrangementSee Board Types for possible values.
cuotaPension
CuotaPension | null
Board quota (only applicable when tipoPension is not "SIN_CABALLO")Possible values:
  • "ENTERA" - Full board
  • "MEDIA" - Half board
  • "TERCIO" - Third board
Set to null when tipoPension is "SIN_CABALLO"

Example

{
  "id": 123,
  "dni": "12345678",
  "nombre": "María",
  "apellido": "González",
  "fechaNacimiento": "1995-06-15",
  "codigoArea": "221",
  "telefono": "5551234",
  "email": "[email protected]",
  "fechaInscripcion": "2024-01-15",
  "cantidadClases": 8,
  "propietario": false,
  "activo": true,
  "caballoPropio": 45,
  "tipoPension": "RESERVA_ESCUELA",
  "cuotaPension": "ENTERA"
}

Business Rules

  • DNI must be unique across all students (validated in real-time)
  • Phone numbers are automatically formatted with +549 prefix
  • Students with tipoPension: "SIN_CABALLO" must have cuotaPension: null
  • Private horses can only be used by their owners
  • Inactive students cannot be assigned to regular classes (only trial classes)
  • Students are automatically set as active upon registration
See Validation Rules for more details.

Build docs developers (and LLMs) love