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
20 lines
598 B
Python
20 lines
598 B
Python
"""查重记录仓库端口(Protocol)。"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain.duplication import DuplicationRecord
|
|
|
|
|
|
class DuplicationRecordRepository(Protocol):
|
|
def create(self, record: DuplicationRecord) -> DuplicationRecord: ...
|
|
|
|
def get(self, record_id: str) -> DuplicationRecord | None: ...
|
|
|
|
def list_by_user(self, user_id: str, *, offset: int = 0, limit: int = 50) -> list[DuplicationRecord]: ...
|
|
|
|
def update(self, record: DuplicationRecord) -> DuplicationRecord: ...
|
|
|
|
def delete(self, record_id: str) -> bool: ...
|