package com.project.beautycenter.service.impl; import com.project.beautycenter.model.Uplata; import com.project.beautycenter.repository.UplataRepository; import com.project.beautycenter.service.UplataService; import org.springframework.stereotype.Service; import java.util.List; @Service public class UplataServiceImpl implements UplataService { private final UplataRepository uplataRepository; public UplataServiceImpl(UplataRepository uplataRepository) { this.uplataRepository = uplataRepository; } @Override public List findAll() { return this.uplataRepository.findAll(); } @Override public Uplata findbyId(Integer id) { return this.uplataRepository.findById(id).orElseThrow(NullPointerException::new); } }