feat(reporting): Implement 'Report Mistake' feature with API and UI [2f388f42]
This commit is contained in:
@@ -58,6 +58,7 @@ class Company(Base):
|
||||
# Relationships
|
||||
signals = relationship("Signal", back_populates="company", cascade="all, delete-orphan")
|
||||
enrichment_data = relationship("EnrichmentData", back_populates="company", cascade="all, delete-orphan")
|
||||
reported_mistakes = relationship("ReportedMistake", back_populates="company", cascade="all, delete-orphan")
|
||||
contacts = relationship("Contact", back_populates="company", cascade="all, delete-orphan")
|
||||
|
||||
|
||||
@@ -203,6 +204,25 @@ class ImportLog(Base):
|
||||
duplicate_rows = Column(Integer)
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
|
||||
class ReportedMistake(Base):
|
||||
__tablename__ = "reported_mistakes"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
company_id = Column(Integer, ForeignKey("companies.id"), index=True, nullable=False)
|
||||
field_name = Column(String, nullable=False)
|
||||
wrong_value = Column(Text, nullable=True)
|
||||
corrected_value = Column(Text, nullable=True)
|
||||
source_url = Column(String, nullable=True)
|
||||
quote = Column(Text, nullable=True)
|
||||
user_comment = Column(Text, nullable=True)
|
||||
status = Column(String, default="PENDING", nullable=False) # PENDING, APPROVED, REJECTED
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
|
||||
company = relationship("Company", back_populates="reported_mistakes")
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# UTILS
|
||||
# ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user