checkpoint: DB baseline reset (v10) with perfect column order for n8n.
Integrated catalog_robot.py logic for structured data ingestion. Updated models and documentation for the Robot Ecosystem.
This commit is contained in:
@@ -14,7 +14,7 @@ from .asset import (
|
||||
)
|
||||
|
||||
# Szerviz és Szakértelem (ÚJ)
|
||||
from .service import ServiceProfile, ExpertiseTag, ServiceExpertise
|
||||
from .service import ServiceProfile, ExpertiseTag, ServiceExpertise, ServiceStaging
|
||||
|
||||
# Földrajzi adatok és Címek
|
||||
from .address import Address, GeoPostalCode, GeoStreet, GeoStreetType
|
||||
@@ -45,11 +45,13 @@ __all__ = [
|
||||
"Organization", "OrganizationMember",
|
||||
"Asset", "AssetCatalog", "AssetCost", "AssetEvent", "AssetFinancials",
|
||||
"AssetTelemetry", "AssetReview", "ExchangeRate",
|
||||
"ServiceProfile", "ExpertiseTag", "ServiceExpertise", # <--- HOZZÁADVA
|
||||
"Address", "GeoPostalCode", "GeoStreet", "GeoStreetType",
|
||||
"PointRule", "LevelConfig", "UserStats", "Badge", "UserBadge", "Rating", "PointsLedger",
|
||||
"SystemParameter", "Document", "Translation", "PendingAction",
|
||||
"SubscriptionTier", "OrganizationSubscription",
|
||||
"CreditTransaction", "ServiceSpecialty", "AuditLog", "VehicleOwnership",
|
||||
# --- SZERVIZ MODUL (Tisztítva) ---
|
||||
"ServiceProfile", "ExpertiseTag", "ServiceExpertise", "ServiceStaging",
|
||||
# --- ALIASOK ---
|
||||
"Vehicle", "UserVehicle", "VehicleCatalog", "ServiceRecord"
|
||||
]
|
||||
Binary file not shown.
Binary file not shown.
@@ -69,4 +69,46 @@ class ServiceExpertise(Base):
|
||||
validation_level = Column(Integer, default=0)
|
||||
|
||||
service = relationship("ServiceProfile", back_populates="expertises")
|
||||
expertise = relationship("ExpertiseTag")
|
||||
expertise = relationship("ExpertiseTag")
|
||||
|
||||
class ServiceStaging(Base):
|
||||
"""
|
||||
Átmeneti tábla a Hunter (n8n/scraping) adatoknak.
|
||||
A címek itt már darabolva (IRSZ, Város, Utca, Házszám) szerepelnek
|
||||
a jobb kereshetőség és validálás érdekében.
|
||||
"""
|
||||
__tablename__ = "service_staging"
|
||||
__table_args__ = {"schema": "data"}
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
|
||||
# --- Alapadatok ---
|
||||
name = Column(String, nullable=False, index=True)
|
||||
|
||||
# --- Strukturált cím adatok (A kérésedre bontva) ---
|
||||
postal_code = Column(String(10), nullable=True, index=True) # Irányítószám
|
||||
city = Column(String(100), nullable=True, index=True) # Település
|
||||
street = Column(String(255), nullable=True) # Utca és közterület jellege (pl. Diófa utca)
|
||||
house_number = Column(String(50), nullable=True) # Házszám, emelet, ajtó
|
||||
full_address = Column(String, nullable=True) # Az eredeti, egybefüggő cím (ha van)
|
||||
|
||||
# --- Elérhetőségek ---
|
||||
contact_phone = Column(String, nullable=True)
|
||||
email = Column(String, nullable=True)
|
||||
website = Column(String, nullable=True)
|
||||
|
||||
# --- Forrás és Azonosítás ---
|
||||
source = Column(String(50), nullable=True, index=True) # Forrás: 'OSM', 'Facebook', stb.
|
||||
external_id = Column(String(100), nullable=True, index=True) # Külső ID (pl. OSM node id)
|
||||
|
||||
# --- Adatmentés ---
|
||||
# Itt landol a teljes robot-zsákmány minden apró részlettel
|
||||
raw_data = Column(JSONB, server_default=text("'{}'::jsonb"))
|
||||
|
||||
# --- Státusz és Bizalom ---
|
||||
# status lehet: pending (feldolgozás alatt), enriched (nyomozó által bővített),
|
||||
# duplicate (már megvan), verified (élesítésre kész)
|
||||
status = Column(String(20), server_default=text("'pending'"), index=True)
|
||||
trust_score = Column(Integer, default=0)
|
||||
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
Reference in New Issue
Block a user