UserLoginLog.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 用户ID
  11. * @property string $ip 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-read \App\Models\User|null $user
  20. * @method static Builder|UserLoginLog newModelQuery()
  21. * @method static Builder|UserLoginLog newQuery()
  22. * @method static Builder|UserLoginLog query()
  23. * @method static Builder|UserLoginLog whereArea($value)
  24. * @method static Builder|UserLoginLog whereCity($value)
  25. * @method static Builder|UserLoginLog whereCountry($value)
  26. * @method static Builder|UserLoginLog whereCounty($value)
  27. * @method static Builder|UserLoginLog whereCreatedAt($value)
  28. * @method static Builder|UserLoginLog whereId($value)
  29. * @method static Builder|UserLoginLog whereIp($value)
  30. * @method static Builder|UserLoginLog whereIsp($value)
  31. * @method static Builder|UserLoginLog whereProvince($value)
  32. * @method static Builder|UserLoginLog whereUserId($value)
  33. * @mixin \Eloquent
  34. */
  35. class UserLoginLog extends Model {
  36. const UPDATED_AT = null;
  37. protected $table = 'user_login_log';
  38. public function user(): HasOne {
  39. return $this->hasOne(User::class, 'id', 'user_id');
  40. }
  41. }