Fix new services implementation 3
This commit is contained in:
@@ -19,7 +19,7 @@ class ModelPerformanceMetric(Base):
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
model_id = Column(UUID(as_uuid=True), nullable=False, index=True)
|
||||
tenant_id = Column(UUID(as_uuid=True), nullable=False, index=True)
|
||||
product_name = Column(String(255), nullable=False)
|
||||
inventory_product_id = Column(UUID(as_uuid=True), nullable=False) # Reference to inventory service
|
||||
|
||||
# Performance metrics
|
||||
mae = Column(Float) # Mean Absolute Error
|
||||
@@ -48,7 +48,7 @@ class PredictionCache(Base):
|
||||
|
||||
# Cached data
|
||||
tenant_id = Column(UUID(as_uuid=True), nullable=False, index=True)
|
||||
product_name = Column(String(255), nullable=False)
|
||||
inventory_product_id = Column(UUID(as_uuid=True), nullable=False) # Reference to inventory service
|
||||
location = Column(String(255), nullable=False)
|
||||
forecast_date = Column(DateTime(timezone=True), nullable=False)
|
||||
|
||||
@@ -64,4 +64,4 @@ class PredictionCache(Base):
|
||||
hit_count = Column(Integer, default=0)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<PredictionCache(key={self.cache_key}, product={self.product_name})>"
|
||||
return f"<PredictionCache(key={self.cache_key}, inventory_product_id={self.inventory_product_id})>"
|
||||
|
||||
Reference in New Issue
Block a user