From d24056dfa246d6ecf67447fa65eb0cdd67942df3 Mon Sep 17 00:00:00 2001 From: Matheus Date: Fri, 31 Oct 2025 22:44:37 -0300 Subject: Adicionado campos no banco de dados --- api/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'api/models.py') diff --git a/api/models.py b/api/models.py index d6bd2ba..98549bc 100644 --- a/api/models.py +++ b/api/models.py @@ -60,6 +60,7 @@ class Measure(Base): id = Column(Integer, primary_key=True, index=True) name = Column(String(50), nullable=True, index=True) + unit_code = Column(String(10), nullable=True) # Relationships readings = relationship("Reading", back_populates="measure") @@ -75,6 +76,7 @@ class Reading(Base): sensor_device_id = Column(Integer, ForeignKey("sensor_devices.id"), nullable=True, index=True) measure_id = Column(Integer, ForeignKey("measures.id"), nullable=True, index=True) value = Column(Float, nullable=True) + time = Column(DateTime, nullable=True) # Relationships sensor_device = relationship("SensorDevice", back_populates="readings") -- cgit v1.2.3