17 lines
854 B
Python
17 lines
854 B
Python
from sqlalchemy import Column, Integer, String, DateTime, JSON
|
|
from sqlalchemy.sql import func
|
|
from datetime import datetime
|
|
from ..models import Base
|
|
|
|
class Configuration(Base):
|
|
__tablename__ = "configurations"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
fitbit_client_id = Column(String, nullable=True)
|
|
fitbit_client_secret = Column(String, nullable=True) # This should be encrypted in production
|
|
fitbit_redirect_uri = Column(String, nullable=True)
|
|
garmin_username = Column(String, nullable=True)
|
|
garmin_password = Column(String, nullable=True) # This should be encrypted in production
|
|
sync_settings = Column(JSON, nullable=True) # JSON field for sync preferences
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now()) |