21 lines
382 B
Go
21 lines
382 B
Go
|
// request
|
||
|
package models
|
||
|
|
||
|
type Request struct {
|
||
|
Id int
|
||
|
OfficeHour OfficeHour
|
||
|
Action int
|
||
|
Secret string
|
||
|
}
|
||
|
|
||
|
const RequestActivate int = 1
|
||
|
const RequestDelete int = 2
|
||
|
|
||
|
const SecretLength int = 15
|
||
|
|
||
|
type RequestRepository interface {
|
||
|
Add(officeHour OfficeHour, action int) (int, error)
|
||
|
FindBySecret(secret string) (Request, error)
|
||
|
Execute(request Request) error
|
||
|
}
|