sprechstunden-go/models/request.go

19 lines
493 B
Go
Raw Normal View History

// request
package models
type Request struct {
Id int
OfficeHour OfficeHour
Action int
Secret string
}
2022-11-04 20:15:38 +00:00
const RequestActivate int = 1 // Fix integer to represent request for activation of an office hour.
const RequestDelete int = 2 // Fix integer to represent request for deletion of an office hour.
type RequestRepository interface {
Add(officeHour OfficeHour, action int) (int, error)
FindBySecret(secret string) (Request, error)
Execute(request Request) error
}