Files
goInventorize/database_structs.go
2022-04-03 22:04:23 -04:00

69 lines
2.3 KiB
Go

package main
// Location is a top level component that starts the containerization process
type Location struct {
ID int `storm:"id,increment,index"`
Name string `storm:"unique"`
Description string
Notes string
Address string
SquareFeet int
Latitude string
Longitude string
DatePurchased string
PurchasePrice string
CurrentValue string
CoverPhoto string // A "cover photo" for the location
Photos []string // A list of additional photos for the location
Files []string
Rooms []Room
}
// Room is a containerized area at a location
type Room struct {
ID int `storm:"id,increment,index"`
Name string
Description string
Paint string // Details about the paint
Notes string
SquareFeet int
CoverPhoto string // A "cover photo" for the room
Photos []string // A list of additional photos for the room
Cabinets []Cabinet
Items []Item
LocationID int //Which location room is assigned to
LocationName string // Location name room belongs to
}
// Cabinet is a containerized area in a room
type Cabinet struct {
ID int `storm:"id, increment"`
RoomID int // Room ID that the cabinet is assigned to
RoomName string // Room name cabinet belongs to
CoverPhoto string // A "Cover photo" for this item
Items []Item // List of items in the cabinet
Name string
Notes string
}
// Item is contained inside a room or cabinet
type Item struct {
ID int `storm:"id, increment"`
LocType string // Can be Room or Cabinet to show where it is stored
RoomID int // Room ID that item is assigned to (can also be in a cabinet)
RoomName string // Room name that item is assigned to
CabinetID int //The cabinet id that an item is assigned to
CabinetName string // The name of the cabinet it belongs to
CoverPhoto string // A "cover photo" for the item
Photos []string // A list of additional photos for the item
Count int // If item has duplicates
Name string
Product string
Serial string
Warranty string
Notes string
DatePurchased string
Files []string //filepath to any files relevant to this item
}