Started with items

This commit is contained in:
2026-06-03 14:24:14 +02:00
parent 78731c1728
commit 0a44df319d
9 changed files with 279 additions and 24 deletions

34
models/inventory.go Normal file
View File

@@ -0,0 +1,34 @@
package models
type Item struct {
ID int `json:"id"`
Name string `json:"name"`
Category string `json:"category"`
Description string `json:"description"`
TotalQuantity int `json:"total_quantity"`
}
type Location struct {
ID int `json:"id"`
Name string `json:"name"`
}
type Project struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
type Stock struct {
ID int `json:"id"`
ItemID int `json:"item_id"`
LocationID int `json:"location_id"`
Quantity int `json:"quantity"`
}
type ProjectItem struct {
ID int `json:"id"`
ItemID int `json:"item_id"`
ProjectID int `json:"project_id"`
Quantity int `json:"quantity"`
}