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