File size: 659 Bytes
57cf043
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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")