脕lvaro Valenzuela Valdes commited on
Commit 路
44737dd
1
Parent(s): 048a272
fix: rename reserved 'metadata' attribute to 'tab_metadata' in SQL models
Browse files
backend/app/models/tender_detail.py
CHANGED
|
@@ -11,7 +11,7 @@ class TenderDetailTabModel(Base):
|
|
| 11 |
tab_name = Column(String(100)) # Preguntas, Historial, Apertura, Adjudicaci贸n, Antecedentes, etc.
|
| 12 |
tab_type = Column(String(50)) # questions, history, opening, adjudication, attachments, criteria
|
| 13 |
content_summary = Column(Text) # Summary of tab content
|
| 14 |
-
|
| 15 |
attachment_urls = Column(JSON, nullable=True) # List of attachment URLs for this tab
|
| 16 |
last_fetched = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
| 17 |
html_content = Column(Text, nullable=True) # Optional: store raw HTML for later parsing
|
|
|
|
| 11 |
tab_name = Column(String(100)) # Preguntas, Historial, Apertura, Adjudicaci贸n, Antecedentes, etc.
|
| 12 |
tab_type = Column(String(50)) # questions, history, opening, adjudication, attachments, criteria
|
| 13 |
content_summary = Column(Text) # Summary of tab content
|
| 14 |
+
tab_metadata = Column(JSON, nullable=True) # Tab-specific data (counts, dates, etc.)
|
| 15 |
attachment_urls = Column(JSON, nullable=True) # List of attachment URLs for this tab
|
| 16 |
last_fetched = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
| 17 |
html_content = Column(Text, nullable=True) # Optional: store raw HTML for later parsing
|
backend/app/routers/tender_details.py
CHANGED
|
@@ -58,7 +58,7 @@ async def extract_and_save_detail_tabs(
|
|
| 58 |
tender_code=code,
|
| 59 |
tab_name=tab_data.get("name"),
|
| 60 |
tab_type=tab_type,
|
| 61 |
-
|
| 62 |
)
|
| 63 |
db.add(tab_entry)
|
| 64 |
|
|
|
|
| 58 |
tender_code=code,
|
| 59 |
tab_name=tab_data.get("name"),
|
| 60 |
tab_type=tab_type,
|
| 61 |
+
tab_metadata=tab_data
|
| 62 |
)
|
| 63 |
db.add(tab_entry)
|
| 64 |
|