"""查重记录仓库端口（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: ...
