From 0e081297d0f31844b2fc1c82930b552409578518 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Tue, 29 Oct 2024 12:24:46 +0200 Subject: [PATCH] Add Type to database schema --- db/db.go | 1 + db/type.go | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 db/type.go 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 +}