loginLog.go 754 B

12345678910111213141516171819202122232425262728293031
  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. TimeModel
  13. }
  14. const (
  15. LoginLogClientWebAdmin = "webadmin"
  16. LoginLogClientWeb = "webclient"
  17. LoginLogClientApp = "app"
  18. )
  19. const (
  20. LoginLogTypeAccount = "account"
  21. LoginLogTypeOauth = "oauth"
  22. )
  23. type LoginLogList struct {
  24. LoginLogs []*LoginLog `json:"list"`
  25. Pagination
  26. }