package ovh.herisson.Clyde.Services;

import org.springframework.stereotype.Service;
import ovh.herisson.Clyde.Repositories.CurriculumRepository;
import ovh.herisson.Clyde.Tables.Curriculum;

@Service
public class CurriculumService {

    private final CurriculumRepository curriculumRepo;

    public CurriculumService(CurriculumRepository curriculumRepo){
        this.curriculumRepo = curriculumRepo;
    }
    public Curriculum save(Curriculum curriculum){
        return curriculumRepo.save(curriculum);
    }
    public Curriculum findById(long id){
        return curriculumRepo.findById(id);
    }

    public void delete(Curriculum curriculum) {
        curriculumRepo.delete(curriculum);
    }
}