sprechstunden-go/models/officeHour.go

22 lines
505 B
Go

// officeHour
package models
type OfficeHour struct {
Id int
Tutor Tutor
Date
Room Room
Course Course
Info string
Active bool
Duration int
}
type OfficeHourRepository interface {
FindById(id int) (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) (int, error)
}