Files
uPortal2/backend/internal/auth/model.go
T
2026-10-21 19:41:26 +03:00

18 lines
265 B
Go

package auth
import "time"
type Session struct {
Token string
UserId int64
Address string
Device string
CreatedAt time.Time
ExpiresAt time.Time
IsLong bool
}
func (s *Session) IsValid() bool {
return time.Now().UTC().Before(s.ExpiresAt)
}