2
0

session.go 261 B

123456789101112131415161718
  1. package models
  2. import (
  3. "time"
  4. "gorm.io/gorm"
  5. )
  6. // Session type that extends gorm.Model.
  7. type Session struct {
  8. gorm.Model
  9. // Session ID
  10. Key string `gorm:"unique"`
  11. // encrypted cookie
  12. Data []byte
  13. // Time the session will expire
  14. ExpiresAt time.Time
  15. }