SurfSense/surfsense_backend/app/schemas/search_space.py
Anish Sarkar c1fe95939f refactor: remove legacy SearXNG API references and web search settings
- Deleted the migration script for adding web search columns to the database.
- Removed web search related fields from the SearchSpace model and schemas.
- Eliminated web search health check endpoint and associated service logic.
- Updated frontend components to remove web search settings management.
- Cleaned up references to SearXNG API in various modules, transitioning to a platform service approach.
2026-03-15 03:49:37 +05:30

40 lines
963 B
Python

import uuid
from datetime import datetime
from pydantic import BaseModel, ConfigDict
from .base import IDModel, TimestampModel
class SearchSpaceBase(BaseModel):
name: str
description: str | None = None
class SearchSpaceCreate(SearchSpaceBase):
citations_enabled: bool = True
qna_custom_instructions: str | None = None
class SearchSpaceUpdate(BaseModel):
name: str | None = None
description: str | None = None
citations_enabled: bool | None = None
qna_custom_instructions: str | None = None
class SearchSpaceRead(SearchSpaceBase, IDModel, TimestampModel):
id: int
created_at: datetime
user_id: uuid.UUID
citations_enabled: bool
qna_custom_instructions: str | None = None
model_config = ConfigDict(from_attributes=True)
class SearchSpaceWithStats(SearchSpaceRead):
"""Extended search space info with member count and ownership status."""
member_count: int = 1
is_owner: bool = False