diff --git a/db/db.go b/db/db.go index 8caac5e..fe704a6 100644 --- a/db/db.go +++ b/db/db.go @@ -59,5 +59,6 @@ func Connect() *gorm.DB { gormDB.AutoMigrate(&Type{}) gormDB.AutoMigrate(&Session{}) gormDB.AutoMigrate(&Expense{}) + gormDB.AutoMigrate(&Metric{}) return newUDB } diff --git a/db/metric.go b/db/metric.go new file mode 100644 index 0000000..b39026e --- /dev/null +++ b/db/metric.go @@ -0,0 +1,10 @@ +package db + +import "gorm.io/gorm" + +type Metric struct { + gorm.Model + Value uint8 + Name string + Short string +}