setup for sqlite

This commit is contained in:
2024-03-02 17:47:13 +00:00
parent 99801f0255
commit 6c5e3d2213
10 changed files with 246 additions and 113 deletions

47
db/entities.go Normal file
View File

@@ -0,0 +1,47 @@
package db
// enums
type PackingStage int
type Category int
const (
Essentials PackingStage = iota
StageOne
StageTwo
StageThree
)
const (
Bedroom Category = iota
Bathroom
Kitchen
Office
LivingRoom
Other
)
// entities
type Item struct {
ID int
Name string
Notes *string
Description *string
Stage PackingStage
Category Category
}
type Box struct {
ID int
Name string
Notes *string
Description *string
Stage PackingStage
Category Category
}
// joins
type BoxItem struct {
ID int
BoxID int
ItemID int
}