more frontend formatting and logic for locations and rooms

This commit is contained in:
2022-03-28 22:47:37 -04:00
parent 02a9c6c99c
commit 36fe4ca701
10 changed files with 273 additions and 57 deletions

View File

@@ -8,25 +8,34 @@ import (
// 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
CoverPhoto string // A "cover photo" for the location
Photos []string // A list of additional photos for the location
Rooms []Room
Notes string
ID int `storm:"id,increment,index"`
Name string `storm:"unique"`
Description string
CoverPhoto string // A "cover photo" for the location
Photos []string // A list of additional photos for the location
Rooms []Room
Notes string
Address string
SquareFeet int
Latitude string
Longitude string
DatePurchased string
PurchasePrice string
CurrentValue string
}
// Room is a containerized area at a location
type Room struct {
ID int `storm:"id,increment,index"`
Name string `storm:"unique"`
Description string
CoverPhoto string // A "cover photo" for the room
Photos []string // A list of additional photos for the room
Notes string
Cabinets []Cabinet
Items []Item
ID int `storm:"id,increment,index"`
Name string `storm:"unique"`
Description string
CoverPhoto string // A "cover photo" for the room
Photos []string // A list of additional photos for the room
Notes string
Cabinets []Cabinet
Items []Item
SquareFeet int
LocationID int //Which location room is assigned to
LocationName string // Location name room belongs to