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.
20 lines
630 B
20 lines
630 B
package quartermaster
|
|
|
|
type Location struct {
|
|
ID int `json:"id,omitempty"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Parent *Location `json:"parent,omitempty"`
|
|
}
|
|
|
|
type LocationService interface {
|
|
Location(int, *User) (*Location, error)
|
|
AddLocation(*Location, *User) (*Location, error)
|
|
UpdateLocation(*Location, *User) error
|
|
DeleteLocation(*Location, *User) error
|
|
GetChildren(*Location, *User) ([]*Location, error)
|
|
GetItems(*Location, *User) (map[*Item]int, error)
|
|
GetItemCount(*Location, *Item, *User) (int, error)
|
|
GetTopLocations(*User) ([]*Location, error)
|
|
}
|