diff --git a/db/db.go b/db/db.go index 43f3e9c..dfd3d08 100644 --- a/db/db.go +++ b/db/db.go @@ -53,5 +53,6 @@ func Connect() *gorm.DB { gormDB.AutoMigrate(&Transfer{}) gormDB.AutoMigrate(&User{}) gormDB.AutoMigrate(&Type{}) + gormDB.AutoMigrate(&Session{}) return newUDB } diff --git a/db/session.go b/db/session.go new file mode 100644 index 0000000..62a70f8 --- /dev/null +++ b/db/session.go @@ -0,0 +1,10 @@ +package db + +import "time" + +type Session struct { + ID string `gorm:"primaryKey"` + UserID uint + User *User + ExpireAt time.Time +}