Datenbanken, erster Versuch
This commit is contained in:
parent
b26544756a
commit
766aedf22d
21 changed files with 678 additions and 320 deletions
23
models/officeHour.go
Normal file
23
models/officeHour.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
// officeHour
|
||||
package models
|
||||
|
||||
type OfficeHour struct {
|
||||
Id int
|
||||
Tutor Tutor
|
||||
Week int
|
||||
Date
|
||||
Room Room
|
||||
Course Course
|
||||
Info string
|
||||
Active bool
|
||||
Duration int
|
||||
}
|
||||
|
||||
type OfficeHourRepository interface {
|
||||
FindById(id int) (OfficeHour, error)
|
||||
FindByCourse(course Course) ([]OfficeHour, error)
|
||||
FindByRoom(room Room) ([]OfficeHour, error)
|
||||
GetAll() ([]OfficeHour, error)
|
||||
Delete(officeHour OfficeHour) error
|
||||
Add(officeHour OfficeHour) error
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue