feat: Add method to get extractions by status and implement user info retrieval in extraction service
This commit is contained in:
@@ -39,6 +39,15 @@ class ExtractionRepository(BaseRepository[Extraction]):
|
||||
)
|
||||
return list(result.all())
|
||||
|
||||
async def get_by_status(self, status: str) -> list[Extraction]:
|
||||
"""Get all extractions by status."""
|
||||
result = await self.session.exec(
|
||||
select(Extraction)
|
||||
.where(Extraction.status == status)
|
||||
.order_by(Extraction.created_at)
|
||||
)
|
||||
return list(result.all())
|
||||
|
||||
async def get_pending_extractions(self) -> list[tuple[Extraction, User]]:
|
||||
"""Get all pending extractions."""
|
||||
result = await self.session.exec(
|
||||
|
||||
Reference in New Issue
Block a user