Documentation Index
Fetch the complete documentation index at: https://mintlify.com/IvBanzaga/Refugio/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Companion functions handle the management of additional people (acompañantes) associated with reservations in the Refugio system.Functions
obtener_acompanantes
Get all companions for a specific reservation.Database connection object
Reservation ID
Array of companion objects ordered by ID. Returns empty array on error.
SQL Query
Code Example
agregar_acompanante
Add a companion to a reservation.Database connection object
Reservation ID
Companion data:
num_socio(string) - Member number (if member)es_socio(bool) - Whether companion is a memberdni(string) - National IDnombre(string) - First nameapellido1(string) - First surnameapellido2(string) - Second surnameactividad(string) - Planned activity
True on success, false on failure
SQL Query
Code Example
eliminar_acompanante
Remove a companion from the system.Database connection object
Companion ID
True on success, false on failure
Code Example
Data Structure
Companion Fields
Theacompanantes table contains the following fields:
| Field | Type | Description |
|---|---|---|
| id | int | Companion ID (auto-increment) |
| id_reserva | int | Associated reservation ID |
| num_socio | string | Member number (nullable) |
| es_socio | boolean | Whether companion is a club member |
| dni | string | National ID number |
| nombre | string | First name |
| apellido1 | string | First surname |
| apellido2 | string | Second surname |
| actividad | string | Planned activity |
Integration Example
Complete workflow for managing companions on a reservation:Validation Considerations
When implementing companion management in your application:
- Validate that the reservation exists before adding companions
- Check bed capacity: total people (reservation holder + companions) should not exceed reserved beds
- Sanitize input data before passing to these functions
- Consider implementing companion limits based on reservation bed count