remove sub things and add view
All checks were successful
build / windows (push) Successful in 2m22s
build / linux (push) Successful in 2m3s

This commit is contained in:
2025-03-07 15:23:33 +01:00
parent feb248e991
commit 2b13e5c03a
5 changed files with 3 additions and 85 deletions

View File

@ -10,15 +10,8 @@ import (
)
type Thing struct {
ID int
Name string
Subthings []SubThing
}
type SubThing struct {
ID int
ThingID int
Name string
ID int
Name string
}
func InitDB() *gorm.DB {
@ -30,6 +23,6 @@ func InitDB() *gorm.DB {
if err != nil {
log.Panic(err)
}
db.AutoMigrate(&Thing{}, &SubThing{})
db.AutoMigrate(&Thing{})
return db
}