Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jparra-amell/api_solsql/llms.txt

Use this file to discover all available pages before exploring further.

SolSQL API organizes its data around places — physical locations of interest. Places belong to cities, cities belong to departments, and place types categorize what kind of location each place is. Users interact with places through comments, reactions, and favorites, and each place can have an attached photo gallery.

Entity relationships

Departments
  └── Cities (department_id → Departments)
        └── Places (city_id → Cities, type_id → PlaceTypes)
              ├── Photos (place_id → Places)
              ├── Comments (place_id → Places, id → Users)
              ├── Reactions (place_id → Places, user_id → Users)
              └── Favorites (place_id → Places, id → Users)

PlaceTypes
  └── Places (type_id → PlaceTypes)

Entities

The central entity in the data model. A place represents a physical location of interest such as a restaurant, park, or museum.
FieldTypeDescription
place_idint (PK)Unique identifier for the place
namestringDisplay name of the place
type_idint (FK)References PlaceTypes.type_id
name_typestring?Denormalized type name (nullable)
descriptionstring?Long-form description of the place
addressstring?Street address
city_idint (FK)References Cities.city_id
name_citystring?Denormalized city name (nullable)
opening_hoursstring?Human-readable opening hours
feesstring?Admission or entry fee information
coordinatesstring?Geographic coordinates (e.g., latitude/longitude)
contact_phonestring?Contact phone number
contact_emailstring?Contact email address
social_mediastring?Social media links or handles
statusint?Active/inactive flag
creation_dateDateTime?When the record was created
User accounts are exposed through the vw_user view. The Password field holds a BCrypt hash and is never returned in login responses.
FieldTypeDescription
Idint (PK)Unique user identifier
NamestringDisplay name
EmailstringEmail address (used for login)
PasswordstringBCrypt password hash (redacted in API responses)
Roleint1 = user, 2 = admin
StatusintAccount status flag
Created_atDateTimeAccount creation timestamp
Comments are attached to places and support threaded replies through the parent_comment_id field.
FieldTypeDescription
comment_idint (PK)Unique comment identifier
place_idint (FK)References Places.place_id
name_placestring?Denormalized place name (nullable)
idint (FK)User identifier — references vw_user.Id
namestring?Denormalized user name (nullable)
commentstring?Comment text
parent_comment_idint?References comment_id of the parent comment for threaded replies; null for top-level comments
comment_dateDateTime?When the comment was posted
A reaction records a user’s response to a place (for example, a like or other reaction type).
FieldTypeDescription
idint (PK)Unique reaction identifier
user_idint (FK)References vw_user.Id
name_userstring?Denormalized user name (nullable)
place_idint (FK)References Places.place_id
name_placestring?Denormalized place name (nullable)
reaction_typestringThe type of reaction (e.g., "like")
reaction_dateDateTime?When the reaction was recorded
Favorites let users bookmark places for quick retrieval later.
FieldTypeDescription
favorite_idint (PK)Unique favorite identifier
idint (FK)User identifier — references vw_user.Id
name_userstring?Denormalized user name (nullable)
place_idint (FK)References Places.place_id
name_placestring?Denormalized place name (nullable)
added_dateDateTime?When the user added the favorite
Each place can have multiple photos associated with it.
FieldTypeDescription
photo_idint (PK)Unique photo identifier
place_idint (FK)References Places.place_id
urlstring?URL to the photo resource
descriptionstring?Caption or description of the photo
Departments are the top level of the geographic hierarchy (equivalent to states or regions).
FieldTypeDescription
department_idint (PK)Unique department identifier (mapped column)
Namestring?Department name
Cities belong to a department and are the geographic unit assigned directly to places.
FieldTypeDescription
city_idint (PK)Unique city identifier (mapped column)
Name_citystring?City name
department_idint (FK)References Departments.department_id
Name_departmentstring?Denormalized department name (nullable)
Place types categorize places into groups such as restaurant, museum, or park.
FieldTypeDescription
type_idint (PK)Unique type identifier (mapped column)
Namestring?Type name
Descriptionstring?Description of the place type

PlaceDetail view

The PlaceDetail model is a keyless read model returned by stored procedures for place detail pages. It combines place data with contextual user-specific fields.
FieldTypeDescription
place_idintPlace identifier
namestringPlace name
descriptionstring?Place description
addressstring?Street address
opening_hoursstring?Opening hours
feesstring?Entry fees
coordinatesstring?Geographic coordinates
contact_phonestringContact phone number
contact_emailstringContact email address
social_mediastring?Social media links
tipo_lugarstring?Place type label
ciudadstring?City name
es_favoritoint?Whether the requesting user has favorited this place (1 = yes)
tipo_reaccionstring?The requesting user’s reaction type, if any
PlaceDetail is configured as a keyless entity (HasNoKey()) and is always populated via stored procedure calls rather than direct table queries.

Denormalized fields

Several entities include nullable denormalized fields such as name_city, name_type, name_place, and name_user. These are populated by stored procedures that join related tables, so you get human-readable labels alongside foreign key IDs in a single response without additional lookups.

Build docs developers (and LLMs) love