使用数据库存储管理员和用户登录SESSION

This commit is contained in:
GoEdgeLab
2023-02-04 15:17:02 +08:00
parent 2e5568dd39
commit e27046c75a
9 changed files with 410 additions and 7 deletions

View File

@@ -0,0 +1,7 @@
package models
import "time"
func (this *LoginSession) IsAvailable() bool {
return this.ExpiresAt == 0 || int64(this.ExpiresAt) > time.Now().Unix()
}