Add Metric entity to database schema

This commit is contained in:
qowevisa 2024-11-19 10:12:28 +02:00
parent 83f69a2135
commit 06b317511d
2 changed files with 11 additions and 0 deletions

View File

@ -59,5 +59,6 @@ func Connect() *gorm.DB {
gormDB.AutoMigrate(&Type{}) gormDB.AutoMigrate(&Type{})
gormDB.AutoMigrate(&Session{}) gormDB.AutoMigrate(&Session{})
gormDB.AutoMigrate(&Expense{}) gormDB.AutoMigrate(&Expense{})
gormDB.AutoMigrate(&Metric{})
return newUDB return newUDB
} }

10
db/metric.go Normal file
View File

@ -0,0 +1,10 @@
package db
import "gorm.io/gorm"
type Metric struct {
gorm.Model
Value uint8
Name string
Short string
}