package com.example.moviezone.service.Impl; import com.example.moviezone.model.Customer; import com.example.moviezone.repository.CustomerRepository; import com.example.moviezone.service.CustomerService; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service public class CustomerServiceImpl implements CustomerService { private final CustomerRepository customerRepository; public CustomerServiceImpl(CustomerRepository customerRepository) { this.customerRepository = customerRepository; } @Override public List findAllCustomers() { return customerRepository.findAll(); } @Override public Optional getCustomerById(int id) { return customerRepository.findById(id); } @Override public Customer findByUsername(String username) { return customerRepository.getByUsername(username); } }