UserLoginLog.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\HasOne;
  6. /**
  7. * 用户登录日志
  8. *
  9. * @property int $id
  10. * @property int $user_id
  11. * @property string $ip
  12. * @property string $country
  13. * @property string $province
  14. * @property string $city
  15. * @property string $county
  16. * @property string $isp
  17. * @property string $area
  18. * @property \Illuminate\Support\Carbon $created_at
  19. * @property \Illuminate\Support\Carbon $updated_at
  20. * @property-read \App\Models\User|null $user
  21. * @method static Builder|UserLoginLog newModelQuery()
  22. * @method static Builder|UserLoginLog newQuery()
  23. * @method static Builder|UserLoginLog query()
  24. * @method static Builder|UserLoginLog whereArea($value)
  25. * @method static Builder|UserLoginLog whereCity($value)
  26. * @method static Builder|UserLoginLog whereCountry($value)
  27. * @method static Builder|UserLoginLog whereCounty($value)
  28. * @method static Builder|UserLoginLog whereCreatedAt($value)
  29. * @method static Builder|UserLoginLog whereId($value)
  30. * @method static Builder|UserLoginLog whereIp($value)
  31. * @method static Builder|UserLoginLog whereIsp($value)
  32. * @method static Builder|UserLoginLog whereProvince($value)
  33. * @method static Builder|UserLoginLog whereUpdatedAt($value)
  34. * @method static Builder|UserLoginLog whereUserId($value)
  35. * @mixin \Eloquent
  36. */
  37. class UserLoginLog extends Model {
  38. protected $table = 'user_login_log';
  39. public function user(): HasOne {
  40. return $this->hasOne(User::class, 'id', 'user_id');
  41. }
  42. }