Archived
Template
1
0

Various fixes (#5)

* Fixes #1

* Fixes #2

* Fixes #3

* Fixes #4
This commit is contained in:
Markus Tenghamn
2021-12-13 20:33:50 +01:00
committed by GitHub
parent c2493c238f
commit b5ba3d0387
234 changed files with 872 additions and 58627 deletions

View File

@ -1,9 +1,17 @@
package models
import "gorm.io/gorm"
import (
"gorm.io/gorm"
"time"
)
type Session struct {
gorm.Model
Identifier string
UserID uint
ExpiresAt time.Time
}
func (s Session) HasExpired() bool {
return s.ExpiresAt.Before(time.Now())
}