You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
521 B
19 lines
521 B
package quartermaster
|
|
|
|
type Location struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Parent *Location `json:"parent,omitempty"`
|
|
}
|
|
|
|
type LocationService interface {
|
|
Location(int) (*Location, error)
|
|
AddLocation(*Location) (*Location, error)
|
|
UpdateLocation(*Location) error
|
|
DeleteLocation(*Location) error
|
|
GetChildren(*Location) ([]*Location, error)
|
|
GetItems(*Location) (map[*Item]int, error)
|
|
GetTopLocations() ([]*Location, error)
|
|
}
|