Konvertiere RequestActions zu IOTA
This commit is contained in:
parent
8603087ed5
commit
3495fb5f50
2 changed files with 9 additions and 5 deletions
|
@ -1,18 +1,22 @@
|
|||
// request
|
||||
package models
|
||||
|
||||
type RequestAction int
|
||||
|
||||
type Request struct {
|
||||
Id int
|
||||
OfficeHour OfficeHour
|
||||
Action int
|
||||
Action RequestAction
|
||||
Secret string
|
||||
}
|
||||
|
||||
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.
|
||||
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 int) (int, error)
|
||||
Add(officeHour OfficeHour, action RequestAction) (int, error)
|
||||
FindBySecret(secret string) (Request, error)
|
||||
Execute(request Request) error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue