Documentation ¶
Index ¶
- func DeleteUser(id int) error
- func DoesUserExist(username string) (bool, error)
- func Initialisation(dbc *global.DBConnection)
- type Box
- func (b *Box) AddBoxItem(item Item) error
- func (b *Box) Delete() error
- func (b *Box) GetBoxItems() ([]Item, error)
- func (b *Box) GetBoxItemsJoined() ([]ItemslistEntry, error)
- func (b *Box) GetDetails() error
- func (b *Box) GetFullDetails() (BoxlistEntry, error)
- func (b *Box) Insert() error
- func (b *Box) Update() error
- type BoxlistEntry
- type Equipment
- type Event
- type Fault
- type FaultStatus
- type Item
- func (i *Item) AddFault(f Fault) (Fault, error)
- func (i *Item) Delete() error
- func (i *Item) GetDetails() error
- func (i *Item) GetFaults() ([]Fault, error)
- func (i *Item) GetFullDetails() (ItemslistEntry, error)
- func (i *Item) Insert() error
- func (i *Item) SetBox(id int) error
- func (i *Item) Update() error
- type ItemslistEntry
- type Packinglist
- func (p *Packinglist) AddPackinglistBox(b Box) error
- func (p *Packinglist) Delete() error
- func (p *Packinglist) FindSuitableBoxes() ([]Box, error)
- func (p *Packinglist) GetDetails() error
- func (p *Packinglist) GetPackinglistBoxes() ([]Box, error)
- func (p *Packinglist) Insert() error
- func (p *Packinglist) RemovePackinglistBox(b Box) error
- func (p *Packinglist) Update() error
- type Participant
- type Store
- type User
- type UserRight
- type Wishlist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUser ¶
func DoesUserExist ¶
func Initialisation ¶
func Initialisation(dbc *global.DBConnection)
Types ¶
type Box ¶
type Box struct { BoxID int `gorm:"primary_key;AUTO_INCREMENT;not null"` StoreID int `gorm:"not null"` Items []Item `gorm:"foreignkey:BoxID;association_foreignkey:BoxID"` Code int `gorm:"type:integer(13)"` Description string `gorm:"not null"` Weight int `gorm:"not null;default:0"` }
func (*Box) AddBoxItem ¶
func (*Box) GetBoxItems ¶
func (*Box) GetBoxItemsJoined ¶
func (b *Box) GetBoxItemsJoined() ([]ItemslistEntry, error)
func (*Box) GetDetails ¶
func (*Box) GetFullDetails ¶
func (b *Box) GetFullDetails() (BoxlistEntry, error)
type BoxlistEntry ¶
type BoxlistEntry struct { BoxID int Code int Description string Weight int StoreID int Name string Adress string ManagerID int Username string Email string Right int }
func GetBoxesJoined ¶
func GetBoxesJoined() ([]BoxlistEntry, error)
type Equipment ¶
type Equipment struct { EquipmentID int `gorm:"primary_key;AUTO_INCREMENT;not null"` Name string `gorm:"not null"` }
func GetEquipment ¶
func (*Equipment) GetDetails ¶
type Event ¶
type Event struct { EventID int `gorm:"primary_key;AUTO_INCREMENT;not null"` Name string `gorm:"not null"` Start time.Time `gorm:"not null"` End time.Time `gorm:"not null"` Adress string `gorm:"not null"` Participants []Participant `gorm:"foreignkey:EventID;association_foreignkey:EventID"` }
func GetNextEvent ¶
func (*Event) GetDetails ¶
func (*Event) GetPackinglists ¶
func (e *Event) GetPackinglists() ([]Packinglist, error)
func (*Event) GetParticipants ¶
func (e *Event) GetParticipants() ([]Participant, error)
type Fault ¶
type Fault struct { FaultID int `gorm:"primary_key;AUTO_INCREMENT;not null"` ItemID int `gorm:"not null"` Status FaultStatus `gorm:"not null"` Comment string `gorm:"not null"` }
func (*Fault) GetDetails ¶
type FaultStatus ¶
type FaultStatus int
const ( FaultStatusNew FaultStatus = 0 + iota FaultStatusInRepair FaultStatusFixed FaultStatusUnfixable )
type Item ¶
type Item struct { ItemID int `gorm:"primary_key;AUTO_INCREMENT;not null"` BoxID int EquipmentID int `gorm:"not null"` Equipment Equipment `gorm:"not null"` Code int `gorm:"type:integer(13)"` Description string Faults []Fault `gorm:"foreignkey:ItemID;association_foreignkey:ItemID"` }
func (*Item) GetDetails ¶
func (*Item) GetFullDetails ¶
func (i *Item) GetFullDetails() (ItemslistEntry, error)
type ItemslistEntry ¶
type ItemslistEntry struct { ItemID int ItemCode int ItemDescription string BoxID int BoxCode int BoxDescription string BoxWeight int StoreID int StoreName string StoreAddress string StoreManagerID int EquipmentID int EquipmentName string }
func GetItemsJoined ¶
func GetItemsJoined(storeless bool) ([]ItemslistEntry, error)
type Packinglist ¶
type Packinglist struct { PackinglistID int `gorm:"primary_key;AUTO_INCREMENT;not null"` Name string `gorm:"not null"` EventID int `gorm:"foreignkey:EventID;not null"` Event Event `gorm:"not null"` Boxes []Box `gorm:"many2many:packinglist_boxes;"` Weight int `gorm:"not null;default:0"` }
func GetPackinglists ¶
func GetPackinglists() ([]Packinglist, error)
func (*Packinglist) AddPackinglistBox ¶
func (p *Packinglist) AddPackinglistBox(b Box) error
func (*Packinglist) Delete ¶
func (p *Packinglist) Delete() error
func (*Packinglist) FindSuitableBoxes ¶
func (p *Packinglist) FindSuitableBoxes() ([]Box, error)
func (*Packinglist) GetDetails ¶
func (p *Packinglist) GetDetails() error
func (*Packinglist) GetPackinglistBoxes ¶
func (p *Packinglist) GetPackinglistBoxes() ([]Box, error)
func (*Packinglist) Insert ¶
func (p *Packinglist) Insert() error
func (*Packinglist) RemovePackinglistBox ¶
func (p *Packinglist) RemovePackinglistBox(b Box) error
func (*Packinglist) Update ¶
func (p *Packinglist) Update() error
type Participant ¶
type Participant struct { UserID int `gorm:"type:integer;primary_key;not null"` User User `gorm:"not null;foreignkey:UserID;association_foreignkey:UserID"` EventID int `gorm:"type:integer;primary_key;not null"` Arrival time.Time `gorm:"not null"` Departure time.Time `gorm:"not null"` }
func (*Participant) Delete ¶
func (p *Participant) Delete() error
func (*Participant) GetDetails ¶
func (p *Participant) GetDetails() error
func (*Participant) Insert ¶
func (p *Participant) Insert() error
func (*Participant) Update ¶
func (p *Participant) Update() error
type Store ¶
type Store struct { StoreID int `gorm:"primary_key;AUTO_INCREMENT;not null"` Name string `gorm:"not null"` Adress string `gorm:"not null"` Manager User `gorm:"not null"` ManagerID int `gorm:"foreignkey:ManagerID;not null"` Boxes []Box `gorm:"foreignkey:StoreID;association_foreignkey:StoreID"` }
func (*Store) AddStoreBox ¶
func (*Store) GetDetails ¶
func (*Store) GetManager ¶
func (*Store) GetStoreBoxes ¶
type User ¶
type User struct { UserID int `json:"id" gorm:"primary_key;AUTO_INCREMENT;not null"` Username string `json:"username" gorm:"not null"` Password string `json:"password" gorm:"not null"` Salt string `json:"-" gorm:"not null"` Email string `json:"email" gorm:"not null"` Right UserRight `json:"userright" gorm:"not null"` }
func (*User) GetDetails ¶
func (*User) GetDetailstoUsername ¶
type Wishlist ¶
type Wishlist struct { WishlistID int `gorm:"primary_key;AUTO_INCREMENT;not null"` Name string `gorm:"not null"` Items []Equipment `gorm:"many2many:wishlist_equipment;"` }
func GetWishlists ¶
func (*Wishlist) AddWishlistItem ¶
func (*Wishlist) GetDetails ¶
func (*Wishlist) GetWishlistItems ¶
Click to show internal directories.
Click to hide internal directories.