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,6 +1,9 @@
package models
import "gorm.io/gorm"
import (
"gorm.io/gorm"
"time"
)
type Token struct {
gorm.Model
@ -8,6 +11,11 @@ type Token struct {
Type string
ModelID int
ModelType string
ExpiresAt time.Time
}
func (t Token) HasExpired() bool {
return t.ExpiresAt.Before(time.Now())
}
const (