2022-09-05 15:55:08 +00:00
|
|
|
// 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.
|
2022-09-05 15:55:08 +00:00
|
|
|
|
|
|
|
type RequestRepository interface {
|
|
|
|
Add(officeHour OfficeHour, action int) (int, error)
|
|
|
|
FindBySecret(secret string) (Request, error)
|
|
|
|
Execute(request Request) error
|
|
|
|
}
|