package com.mzh.library.dao;

import com.mzh.library.entity.User;
import com.mzh.library.entity.UserSearchCriteria;

import java.sql.Connection;
import java.util.List;
import java.util.Optional;

public interface UserAccountDao {
    List<User> search(UserSearchCriteria criteria);

    Optional<User> findById(long id);

    Optional<User> findByUsername(String username);

    long create(Connection connection, User user);

    boolean update(Connection connection, User user, boolean updatePassword);
}
