Normalize uploaded documents into structured markdown, add clearer parser errors for missing dependencies, and cover the ingestion flow with backend tests. This also replaces deprecated UTC timestamp helpers in the touched backend paths so the knowledge pipeline stays warning-free. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
466 B
Python
17 lines
466 B
Python
import uuid
|
|
from datetime import UTC, datetime
|
|
from sqlalchemy import Column, String, DateTime
|
|
from app.database import Base
|
|
|
|
|
|
def utc_now() -> datetime:
|
|
return datetime.now(UTC)
|
|
|
|
|
|
class BaseModel(Base):
|
|
__abstract__ = True
|
|
|
|
id = Column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
created_at = Column(DateTime, default=utc_now, nullable=False)
|
|
updated_at = Column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|