login_session.go 267 B

1234567891011121314151617181920
  1. package models
  2. import (
  3. "time"
  4. "gorm.io/gorm"
  5. )
  6. type LoginSession struct {
  7. gorm.Model
  8. UserID uint `sql:"index"`
  9. Device string
  10. IP string
  11. TokenHash string `sql:"index"`
  12. ExpiredAt time.Time
  13. Time string `gorm:"-"`
  14. Status string `gorm:"-"`
  15. }