52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
31 lines
789 B
Python
31 lines
789 B
Python
"""Voice library repository port."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import List, Optional, Protocol
|
|
|
|
from packages.domain.voice_library import VoiceLibraryItem
|
|
|
|
|
|
class VoiceLibraryRepository(Protocol):
|
|
"""配音库仓储接口"""
|
|
|
|
def list_by_user(
|
|
self,
|
|
user_id: str,
|
|
*,
|
|
status: Optional[str] = None,
|
|
skip: int = 0,
|
|
limit: int = 50,
|
|
) -> List[VoiceLibraryItem]: ...
|
|
|
|
def get(self, voice_id: str, user_id: str) -> Optional[VoiceLibraryItem]: ...
|
|
|
|
def create(self, item: VoiceLibraryItem) -> VoiceLibraryItem: ...
|
|
|
|
def update(self, item: VoiceLibraryItem) -> VoiceLibraryItem: ...
|
|
|
|
def delete(self, voice_id: str, user_id: str) -> bool: ...
|
|
|
|
def count_by_user(self, user_id: str) -> int: ...
|