loginLog.go 871 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package model
  2. type LoginLog struct {
  3. IdModel
  4. UserId uint `json:"user_id" gorm:"default:0;not null;"`
  5. Client string `json:"client"` //webadmin,webclient,app,
  6. DeviceId string `json:"device_id"`
  7. Uuid string `json:"uuid"`
  8. Ip string `json:"ip"`
  9. Type string `json:"type"` //account,oauth
  10. Platform string `json:"platform"` //windows,linux,mac,android,ios
  11. UserTokenId uint `json:"user_token_id" gorm:"default:0;not null;"`
  12. IsDeleted uint `json:"is_deleted" gorm:"default:0;not null;"`
  13. TimeModel
  14. }
  15. const (
  16. LoginLogClientWebAdmin = "webadmin"
  17. LoginLogClientWeb = "webclient"
  18. LoginLogClientApp = "app"
  19. )
  20. const (
  21. LoginLogTypeAccount = "account"
  22. LoginLogTypeOauth = "oauth"
  23. )
  24. const (
  25. IsDeletedNo = 0
  26. IsDeletedYes = 1
  27. )
  28. type LoginLogList struct {
  29. LoginLogs []*LoginLog `json:"list"`
  30. Pagination
  31. }