1
0
forked from PGL/Clyde
Files
Clyde/backend/src/main/java/ovh/herisson/Clyde/Services/ScheduleService.java
2024-04-19 21:29:45 +02:00

25 lines
662 B
Java

package ovh.herisson.Clyde.Services;
import org.springframework.stereotype.Service;
import ovh.herisson.Clyde.Repositories.ScheduleRepository;
import ovh.herisson.Clyde.Tables.Schedule;
@Service
public class ScheduleService {
private final ScheduleRepository scheduleRepo;
public ScheduleService(ScheduleRepository scheduleRepo) {
this.scheduleRepo = scheduleRepo;
}
public Schedule save(Schedule schedule){
return scheduleRepo.save(schedule);
}
public Schedule findById(long id){
return scheduleRepo.getById(id);
}
public void delete(Schedule schedule){
scheduleRepo.delete(schedule);
}
}