Add Type to database schema

This commit is contained in:
qowevisa 2024-10-29 12:24:46 +02:00
parent 9cf82d5301
commit 0e081297d0
2 changed files with 11 additions and 0 deletions

View File

@ -52,5 +52,6 @@ func Connect() *gorm.DB {
gormDB.AutoMigrate(&Debt{}) gormDB.AutoMigrate(&Debt{})
gormDB.AutoMigrate(&Transfer{}) gormDB.AutoMigrate(&Transfer{})
gormDB.AutoMigrate(&User{}) gormDB.AutoMigrate(&User{})
gormDB.AutoMigrate(&Type{})
return newUDB return newUDB
} }

10
db/type.go Normal file
View File

@ -0,0 +1,10 @@
package db
import "gorm.io/gorm"
type Type struct {
gorm.Model
Name string
Comment string
Color string
}