Files
xiaoxia-saas/packages/ports/generation_task_repository.py
T
xiaoxia 94aead4342
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production Runtime Images (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
feat: 任务中心升级(失败重试/错误追踪/列表筛选) (#289)
2026-07-14 09:55:53 +08:00

60 lines
1.5 KiB
Python
Executable File

from __future__ import annotations
from typing import Protocol
from packages.domain import GenerationTask
class GenerationTaskRepository(Protocol):
def create(self, task: GenerationTask) -> GenerationTask: ...
def get(self, task_id: str) -> GenerationTask | None: ...
def list_by_project(self, project_id: str) -> list[GenerationTask]: ...
def list_by_user(self, user_id: str) -> list[GenerationTask]: ...
def count_by_user(self, user_id: str) -> int: ...
def count_pending_by_user(self, user_id: str) -> int: ...
def count_pending_total(self) -> int: ...
def list_recent_by_user(self, user_id: str, limit: int = 5) -> list[GenerationTask]: ...
def list_by_source_edit_plan(self, plan_id: str) -> list[GenerationTask]: ...
def list_by_user_filtered(
self,
user_id: str,
*,
status: str | None = None,
limit: int | None = None,
offset: int = 0,
) -> list[GenerationTask]: ...
def count_by_user_filtered(
self,
user_id: str,
*,
status: str | None = None,
) -> int: ...
def list_by_project_filtered(
self,
project_id: str,
*,
status: str | None = None,
limit: int | None = None,
offset: int = 0,
) -> list[GenerationTask]: ...
def count_by_project_filtered(
self,
project_id: str,
*,
status: str | None = None,
) -> int: ...
def update(self, task: GenerationTask) -> GenerationTask: ...