package com.mzh.library.dao;

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

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

public interface ReaderDao {
    List<Reader> search(ReaderSearchCriteria criteria);

    Optional<Reader> findById(long id);

    Optional<Reader> findByIdentifier(String identifier);

    Optional<Reader> findByUserId(long userId);

    long create(Reader reader);

    boolean update(Reader reader);

    boolean deactivate(long id);
}
