Pular para o conteúdo

Schema Reference

Geographic Tables

brazil_regions

Brazil’s 5 macro-regions (Norte, Nordeste, Centro-Oeste, Sudeste, Sul).

brazil_states

All 27 Brazilian states and the Federal District.

ColumnTypeDescription
idINTEGERPrimary key
region_idINTEGERFK to brazil_regions
nameTEXTFull state name
codeTEXT2-letter code (e.g., “SP”)
slugTEXTURL slug (e.g., “sao-paulo”)

brazil_cities

All 5,000+ Brazilian municipalities.

ColumnTypeDescription
idINTEGERPrimary key
state_idINTEGERFK to brazil_states
nameTEXTCity name
slugTEXTURL slug
ibge_codeTEXTIBGE municipality code

Content Tables

scopes

The three real estate scopes.

ColumnTypeDescription
idINTEGERPrimary key
nameTEXTScope name (casas, jardim, condominios)
slugTEXTURL slug
descriptionTEXTSEO description

topics

Content topics (energia-solar, iptu, etc.).

page_types

Classification of generated pages (scope_index, state_index, city_page, topic_page, etc.).

Page Tables

pages

Every generated page has an entry here.

ColumnTypeDescription
idINTEGERPrimary key
url_pathTEXTFull URL path
scope_idINTEGERFK to scopes (nullable)
topic_idINTEGERFK to topics (nullable)
state_codeTEXTState code (nullable)
city_idINTEGERFK to brazil_cities (nullable)
page_type_idINTEGERFK to page_types
titleTEXTPage title
meta_descriptionTEXTSEO meta description
generated_atDATETIMELast generation timestamp

page_content_cache

Pre-rendered HTML content for pages.

ColumnTypeDescription
page_idINTEGERFK to pages
contentTEXTPre-rendered HTML
updated_atDATETIMELast update

page_generation_log

Audit log of page generation events.

Real Estate Tables

property_types

Types of properties (casa, apartamento, terreno, etc.).

listings

Property listings created by users.

ColumnTypeDescription
idINTEGERPrimary key
user_idINTEGEROwner user ID
titleTEXTListing title
descriptionTEXTFull description
priceINTEGERPrice in BRL cents
city_idINTEGERFK to brazil_cities
state_codeTEXTState code
property_type_idINTEGERFK to property_types
statusTEXTactive, inactive, sold
imagesTEXTJSON array of image URLs

real_estate_agents

Real estate agent profiles.

imobiliarias

Real estate agencies.

Blog Tables

blog_themes

Blog categories/themes.

blog_posts

Blog articles.

ColumnTypeDescription
idINTEGERPrimary key
theme_idINTEGERFK to blog_themes
slugTEXTURL slug
titleTEXTArticle title
contentTEXTArticle content (HTML or Markdown)
published_atDATETIMEPublication date

Analytics Tables

notfound_urls

Tracks 404 errors from production.

ColumnTypeDescription
idINTEGERPrimary key
url_pathTEXTThe 404 URL
hit_countINTEGERNumber of times requested
resolvedBOOLEANWhether a page was generated

page_views

Page view analytics.

search_queries

Search terms entered by users.

Scheduler Tables

daily_rotation_tracker

Tracks which state was last refreshed by the daily build.

ColumnTypeDescription
idINTEGERPrimary key
state_codeTEXTLast refreshed state
refreshed_atDATETIMETimestamp