This commit is contained in:
Jottyfan
2023-11-28 22:44:00 +01:00
parent 48525b7e20
commit 690f28f4fe
15 changed files with 300 additions and 35 deletions

View File

@ -0,0 +1,42 @@
package de.jottyfan.bico.modules.lesson;
import java.time.LocalDate;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import de.jottyfan.bico.db.tables.records.TLessonRecord;
import de.jottyfan.bico.db.tables.records.TPersonRecord;
/**
*
* @author jotty
*
*/
@Service
public class LessonService {
@Autowired
private LessonRepository repository;
public TLessonRecord getLesson(Integer slotId, Boolean createIfNecessary) {
return repository.getLesson(slotId, createIfNecessary);
}
public List<TPersonRecord> getPersons() {
return repository.getPersons();
}
public LocalDate getSlotDay(Integer slotId) {
return repository.getSlotDay(slotId);
}
public void updateLesson(TLessonRecord bean) {
repository.updateLesson(bean);
}
public void removeLesson(Integer lessonId) {
repository.removeLesson(lessonId);
}
}