loginLog.go 604 B

123456789101112131415161718192021222324252627282930
  1. package model
  2. type LoginLog struct {
  3. IdModel
  4. UserId uint `json:"user_id"`
  5. Client string `json:"client"` //webadmin,webclient,app,
  6. Uuid string `json:"uuid"`
  7. Ip string `json:"ip"`
  8. Type string `json:"type"` //account,oauth
  9. Platform string `json:"platform"` //windows,linux,mac,android,ios
  10. TimeModel
  11. }
  12. const (
  13. LoginLogClientWebAdmin = "webadmin"
  14. LoginLogClientWeb = "webclient"
  15. LoginLogClientApp = "app"
  16. )
  17. const (
  18. LoginLogTypeAccount = "account"
  19. LoginLogTypeOauth = "oauth"
  20. )
  21. type LoginLogList struct {
  22. LoginLogs []*LoginLog `json:"list"`
  23. Pagination
  24. }