Implement saved sessions
This commit is contained in:
parent
9bec3a591e
commit
71e39dcf62
9 changed files with 187 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package models
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -25,3 +26,13 @@ type UserRole struct {
|
|||
SectionID uint
|
||||
Section Section
|
||||
}
|
||||
|
||||
// TODO: Autoclean expired sessions
|
||||
type UserSavedSession struct {
|
||||
gorm.Model
|
||||
UserID uint
|
||||
User User
|
||||
UUID string
|
||||
Secret string
|
||||
Expiration time.Time
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue