device.py 518 B

1234567891011121314151617
  1. from typing import TYPE_CHECKING
  2. from sqlalchemy import Column, String
  3. from sqlalchemy.orm import relationship
  4. from app.db.session import Base
  5. if TYPE_CHECKING:
  6. from app.models.devices.status_timestamp import BlowyFeedbackTime, HighSpeedTime
  7. class Device(Base):
  8. __tablename__ = "devices"
  9. id = Column(String, primary_key=True, index=True)
  10. blowy_feedback_time = relationship("BlowyFeedbackTime", back_populates="device")
  11. high_speed_time = relationship("HighSpeedTime", back_populates="device")