# -*- coding: utf-8 -*- from datetime import datetime from typing import TYPE_CHECKING from sqlalchemy import Column, DateTime, ForeignKey, Integer, String from sqlalchemy.orm import relationship from app.db.session import Base if TYPE_CHECKING: from app.models.devices.device import Device class BlowyFeedbackTime(Base): __tablename__ = "blowy_feedback_time" id = Column(Integer, primary_key=True, index=True) timestamp = Column(DateTime, default=datetime.utcnow()) device_id = Column(String, ForeignKey("devices.id")) device = relationship("Device", back_populates="blowy_feedback_time") class HighSpeedTime(Base): __tablename__ = "high_speed_time" id = Column(Integer, primary_key=True, index=True) timestamp = Column(DateTime, default=datetime.utcnow()) device_id = Column(String, ForeignKey("devices.id")) device = relationship("Device", back_populates="high_speed_time")