Erstelle Maske, um Sprechstunden hinzuzufügen

This commit is contained in:
Gonne 2022-08-31 22:49:14 +02:00
parent c7a9522c2c
commit 369f4ebcec
15 changed files with 357 additions and 50 deletions

View file

@ -2,6 +2,7 @@
package models
type Date struct {
Week int
Day int
Hour int
Minute int

View file

@ -4,7 +4,6 @@ package models
type OfficeHour struct {
Id int
Tutor Tutor
Week int
Date
Room Room
Course Course
@ -15,9 +14,9 @@ type OfficeHour struct {
type OfficeHourRepository interface {
FindById(id int) (OfficeHour, error)
FindByCourse(course Course) ([]OfficeHour, error)
FindByRoom(room Room) ([]OfficeHour, error)
GetAll() ([]OfficeHour, error)
FindByCourse(course Course, activeOnly bool) ([]OfficeHour, error)
FindByRoom(room Room, activatedOnly bool) ([]OfficeHour, error)
GetAll(activatedOnly bool) ([]OfficeHour, error)
Delete(officeHour OfficeHour) error
Add(officeHour OfficeHour) error
}

View file

@ -9,6 +9,7 @@ type Tutor struct {
type TutorRepository interface {
FindByEmail(Email string) ([]Tutor, error)
FindByNameAndEmail(name string, email string) (Tutor, error)
FindById(Id int) (Tutor, error)
GetAll() ([]Tutor, error)
Add(tutor Tutor) error