sprechstunden-go/models/request.go

22 lines
563 B
Go

// request
package models
type RequestAction int
type Request struct {
Id int
OfficeHour OfficeHour
Action RequestAction
Secret string
}
const (
RequestActivate RequestAction = iota // Fix integer to represent request for activation of an office hour.
RequestDelete // Fix integer to represent request for deletion of an office hour.
)
type RequestRepository interface {
Add(officeHour OfficeHour, action RequestAction) (int, error)
FindBySecret(secret string) (Request, error)
Execute(request Request) error
}