Add Metric entity to database schema
This commit is contained in:
parent
83f69a2135
commit
06b317511d
1
db/db.go
1
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
|
||||
}
|
||||
|
|
10
db/metric.go
Normal file
10
db/metric.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package db
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Metric struct {
|
||||
gorm.Model
|
||||
Value uint8
|
||||
Name string
|
||||
Short string
|
||||
}
|
Loading…
Reference in New Issue
Block a user