diff --git a/db/db.go b/db/db.go index 9b6691b..43f3e9c 100644 --- a/db/db.go +++ b/db/db.go @@ -52,5 +52,6 @@ func Connect() *gorm.DB { gormDB.AutoMigrate(&Debt{}) gormDB.AutoMigrate(&Transfer{}) gormDB.AutoMigrate(&User{}) + gormDB.AutoMigrate(&Type{}) return newUDB } diff --git a/db/type.go b/db/type.go new file mode 100644 index 0000000..3b84c7d --- /dev/null +++ b/db/type.go @@ -0,0 +1,10 @@ +package db + +import "gorm.io/gorm" + +type Type struct { + gorm.Model + Name string + Comment string + Color string +}