from repo_core import BaseRepository

from .model import WebSeed


class WebSeedRepository(BaseRepository[WebSeed]):
    """Repository for crawl seed configuration."""

    TABLE = "web_seeds"
    _backends = {"db"}

    async def list_enabled(self, limit: int = 100):
        """List all enabled seeds."""
        return await self.find(
            self.TABLE,
            {"enabled": True},
            limit=limit,
        )
