Add db.Session type

This commit is contained in:
qowevisa 2024-11-06 19:47:12 +02:00
parent c245039015
commit e9ad95821e
2 changed files with 11 additions and 0 deletions

View File

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

10
db/session.go Normal file
View File

@ -0,0 +1,10 @@
package db
import "time"
type Session struct {
ID string `gorm:"primaryKey"`
UserID uint
User *User
ExpireAt time.Time
}