bed5c7abef
- Separate workspace landing from login for better UX - Referral system rewards both parties with Pro days - Quota enforcement prevents abuse without breaking endpoints - 7-day free trial with auto-downgrade on expiry - Admin-managed search provider config (SearXNG, Bing) - 15% discount on annual subscriptions - MCP search server wrapping opencode search - Fix discovery module field name mismatch causing 422
21 lines
816 B
Python
21 lines
816 B
Python
from sqlalchemy import Column, String, Integer, DateTime, Boolean, Text
|
|
from sqlalchemy.dialects.postgresql import UUID, JSONB
|
|
from datetime import datetime
|
|
from app.database import Base
|
|
import uuid
|
|
|
|
|
|
class SearchProvider(Base):
|
|
__tablename__ = "search_providers"
|
|
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
name = Column(String(100), nullable=False)
|
|
provider_type = Column(String(50), nullable=False)
|
|
api_key = Column(Text, nullable=True)
|
|
api_endpoint = Column(String(500), nullable=True)
|
|
extra_config = Column(JSONB, default={})
|
|
priority = Column(Integer, default=0)
|
|
enabled = Column(Boolean, default=True)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|
|
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|