- новый api/: /pipeline/process (yt-dlp, субтитры или Vosk, LLM/экстрактивная суммаризация), /videos, /llm; старый код перенесён в api_legacy/ - web/: Flet UI (flet 0.28.3 + flet-web, порт 8550) - Dockerfile.api: ffmpeg слоем из mwader/static-ffmpeg, pip с кэш-маунтом - requirements/pyproject: убраны moviepy, imageio-ffmpeg, битый asyncio - README с инструкцией запуска и загрузкой Vosk-модели Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
15 lines
651 B
Python
15 lines
651 B
Python
from sqlalchemy import Column, String, DateTime, ForeignKey, Boolean, Text
|
|
from api.models.base import Base
|
|
|
|
|
|
class Subscription(Base):
|
|
__tablename__ = 'subscriptions'
|
|
uuid = Column(String, primary_key=True, index=True)
|
|
# one subscription per user (unique)
|
|
user_id = Column(String, ForeignKey('users.id'), nullable=False, index=True, unique=True)
|
|
until = Column(DateTime, nullable=False)
|
|
active = Column(Boolean, nullable=False, default=True)
|
|
# avoid NULL: store empty string when no link provided
|
|
subscription_link = Column(Text, nullable=False, default="")
|
|
connect_link = Column(Text, nullable=False, default="")
|