UserLoginLog.php 1.6 KB

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