package org.cmh.backend.UserManagement.repository;


import org.cmh.backend.UserManagement.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserManagementRepository extends JpaRepository<User, Long> {
    User findByName(String name);
    User findByAccountAndPassword(String name,String password);
    User save(User user);

    List<User> findAll();

    User findUserById(Long id);

    User deleteByAccount(String account);

    void deleteById(Long id);

}
