ServicioAdicional entity represents optional services that guests can add to their reservations, such as spa treatments, tours, meals, or amenities. Services can be configured to be available only during specific seasons.
Overview
ServicioAdicional manages service definitions and their seasonal availability. Services maintain a list of seasons in which they are offered, enabling flexible service availability based on demand, weather, or operational capacity.
Namespace: SGRH.Domain.Entities.Servicios
Source: ~/workspace/source/SGRH.Domain/Entities/Servicios/ServicioAdicional.cs
Properties
Unique identifier for the additional service (primary key).
Name of the service (e.g., “Spa Treatment”, “Airport Transfer”). Maximum length: 50 characters.
Service category or type (e.g., “Wellness”, “Transportation”, “Dining”). Maximum length: 50 characters.
Read-only collection of season IDs where this service is available. Empty collection means available year-round.
Constructor
Parameters
- nombreServicio: Service name (max 50 chars, required)
- tipoServicio: Service type/category (max 50 chars, required)
Validations
- Both parameters validated with
Guard.AgainstNullOrWhiteSpace - Maximum length enforced (50 characters each)
Initial State
- Empty
TemporadaIdscollection (available year-round by default)
Example
Methods
HabilitarEnTemporada
- temporadaId: Valid season ID (must be > 0)
- Season ID must be greater than 0
- Cannot add duplicate season (throws
ConflictException)
DeshabilitarEnTemporada
- temporadaId: Season ID to remove
- Season must exist in collection (throws
NotFoundExceptionif not found)
EstaDisponibleEn
- temporadaId: Season ID to check (nullable)
- If
temporadaIdisnull, returnstrue(no season = always available) - If season list is empty, returns
true(available year-round) - Otherwise, returns whether the season is in the collection
Actualizar
- nombreServicio: Updated service name (max 50 chars)
- tipoServicio: Updated service type (max 50 chars)
Seasonal Availability Patterns
Year-Round Services
Services with emptyTemporadaIds are available in all seasons:
Seasonal Services
Services restricted to specific seasons:Seasonal Transitions
Usage in Reservations
Adding Services to Reservations
When adding a service to a reservation:Service Pricing
Services are priced throughServicioCategoriaPrecio entity:
Price Determination
From reservation policy:Business Rules
Seasonal Validation
Seasonal Validation
- Services are validated against season availability when added to reservations
- If a reservation’s dates change to a different season, service availability is re-validated
- Services with no season restrictions are always available
- Empty
TemporadaIds= available in all seasons
Duplicate Prevention
Duplicate Prevention
- Cannot add the same season twice to a service (throws
ConflictException) - Ensures data integrity and prevents confusion
Removal Validation
Removal Validation
- Cannot remove a season that isn’t in the collection (throws
NotFoundException) - Ensures operations are meaningful and prevent silent failures
Service Prerequisites
Service Prerequisites
From Reserva entity:
- Services can only be added to reservations with at least one room
- Ensures proper pricing calculation based on room categories
Common Scenarios
Creating Seasonal Service
Creating Seasonal Service
Scenario: Beach activities only in summer
Year-Round Service with Pricing
Year-Round Service with Pricing
Scenario: Breakfast available year-round, priced by room category
Service Migration Between Seasons
Service Migration Between Seasons
Scenario: Move outdoor service indoors for winter
Service Types Examples
| Service Name | Tipo Servicio | Seasonal? |
|---|---|---|
| Desayuno Buffet | Alimentos | No (Year-round) |
| Cena Romántica | Alimentos | No |
| Masaje | Spa | No |
| Tour de Playa | Excursiones | Yes (Summer only) |
| Ski Pass | Deportes | Yes (Winter only) |
| Transfer Aeropuerto | Transporte | No |
| Bar de Piscina | Bebidas | Yes (High season) |
| Cena al Aire Libre | Alimentos | Yes (Spring/Summer) |
Related Entities
- ReservaServicioAdicional: Links services to reservations with quantity and pricing
- ServicioCategoriaPrecio: Defines service pricing by room category
- Temporada: Defines seasonal periods
Related Documentation
- Reserva - Service management in reservations
- Reservation Policies - Service validation rules
- Validation Guards - Validation mechanisms