package com.example.scaffold.service;

import com.example.scaffold.entity.User;

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

/**
 * 用户服务接口 - 演示接口与实现分离
 */
public interface UserService {
    
    List<User> findAll();
    
    Optional<User> findById(Long id);
    
    User save(User user);
    
    void deleteById(Long id);
    
    List<User> searchByUsername(String username);
    
    long count();
}