Spaces:
Runtime error
Runtime error
| from sqlalchemy import ( | |
| Boolean, | |
| CheckConstraint, | |
| Column, | |
| DateTime, | |
| ForeignKey, | |
| Integer, | |
| String, | |
| ) | |
| from sqlalchemy.orm import mapped_column, relationship | |
| from components.dbo.models.base import Base | |
| class Feedback(Base): | |
| __tablename__ = 'feedback' | |
| userComment = mapped_column(String) | |
| userScore = mapped_column( | |
| Integer, CheckConstraint("userScore > 0 AND userScore < 6"), nullable=False | |
| ) | |
| manualEstimate = mapped_column(Integer) | |
| llmEstimate = mapped_column(Integer) | |
| log_id = mapped_column(Integer, ForeignKey('log.id'), index=True) | |
| log = relationship("Log", back_populates="feedback") | |