Initial commit — PlantGuideScraper project

This commit is contained in:
Trey T
2026-04-12 09:54:27 -05:00
commit 6926f502c5
87 changed files with 29120 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
from datetime import datetime
from sqlalchemy import Column, Integer, String, Text, DateTime
from app.database import Base
class CachedStats(Base):
"""Stores pre-calculated statistics updated by Celery beat."""
__tablename__ = "cached_stats"
id = Column(Integer, primary_key=True, index=True)
key = Column(String(50), unique=True, nullable=False, index=True)
value = Column(Text, nullable=False) # JSON-encoded stats
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)