package com.mzh.library.service;

import com.mzh.library.entity.AuthenticatedUser;
import com.mzh.library.entity.Reader;
import com.mzh.library.entity.ReaderSearchCriteria;

import java.util.List;
import java.util.Optional;

public interface ReaderService {
    ServiceResult<List<Reader>> searchReaders(ReaderSearchCriteria criteria);

    ServiceResult<Optional<Reader>> findReader(long id);

    ServiceResult<Long> createReader(AuthenticatedUser actor, Reader reader);

    ServiceResult<Void> updateReader(AuthenticatedUser actor, Reader reader);

    ServiceResult<Void> deactivateReader(AuthenticatedUser actor, long id);
}
