Added stock management
This commit is contained in:
@@ -5,7 +5,8 @@ type Item struct {
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
Description string `json:"description"`
|
||||
TotalQuantity int `json:"total_quantity"`
|
||||
TotalQuantity int `json:"total_quantity"` // Berechnet aus der Summe aller Stocks
|
||||
FreeQuantity int `json:"free_quantity"` // TotalQuantity minus Summe aller Projekt-Zuweisungen
|
||||
}
|
||||
|
||||
type Location struct {
|
||||
@@ -20,10 +21,19 @@ type Project struct {
|
||||
}
|
||||
|
||||
type Stock struct {
|
||||
ID int `json:"id"`
|
||||
ItemID int `json:"item_id"`
|
||||
LocationID int `json:"location_id"`
|
||||
Quantity int `json:"quantity"`
|
||||
ID int `json:"id"`
|
||||
ItemID int `json:"item_id"`
|
||||
LocationID int `json:"location_id"`
|
||||
Quantity int `json:"quantity"`
|
||||
LocationName string `json:"location_name"` // Used to display the location in the modal table
|
||||
}
|
||||
|
||||
type Association struct {
|
||||
ID int `json:"id"`
|
||||
ProjectID int `json:"project_id"`
|
||||
ItemID int `json:"item_id"`
|
||||
Quantity int `json:"quantity"`
|
||||
ItemName string `json:"item_name"` // Used to display the item name in the modal table
|
||||
}
|
||||
|
||||
type ProjectItem struct {
|
||||
|
||||
Reference in New Issue
Block a user