mirror of
https://github.com/lintsinghua/DeepAudit.git
synced 2026-11-23 22:48:29 +08:00
- Change logger.info to logger.debug in agent_tasks.py streaming and tree endpoints - Disable SQLAlchemy echo mode in database session configuration - Suppress uvicorn access logs and LiteLLM INFO level logging in main application - Remove LogViewer component and LogsPage from frontend - Add trailing newlines to multiple backend configuration and model files - Update frontend routing to remove logs page reference - Improve application startup logging clarity by filtering verbose third-party logs
30 lines
940 B
Python
30 lines
940 B
Python
import uuid
|
|
from sqlalchemy import Column, String, Integer, DateTime, Float, Text, ForeignKey
|
|
from sqlalchemy.sql import func
|
|
from sqlalchemy.orm import relationship
|
|
from app.db.base import Base
|
|
|
|
class InstantAnalysis(Base):
|
|
__tablename__ = "instant_analyses"
|
|
|
|
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
user_id = Column(String, ForeignKey("users.id"), nullable=True) # Can be anonymous? Logic says usually logged in, but localDB allowed check.
|
|
|
|
language = Column(String, nullable=False)
|
|
code_content = Column(Text, default="")
|
|
analysis_result = Column(Text, default="{}")
|
|
issues_count = Column(Integer, default=0)
|
|
quality_score = Column(Float, default=0.0)
|
|
analysis_time = Column(Float, default=0.0)
|
|
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
|
|
# Relationships
|
|
user = relationship("User", backref="instant_analyses")
|
|
|
|
|
|
|
|
|
|
|
|
|