UserLoginLog.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. *
  10. * @property int $id
  11. * @property int $user_id
  12. * @property string $ip
  13. * @property string $country
  14. * @property string $province
  15. * @property string $city
  16. * @property string $county
  17. * @property string $isp
  18. * @property string $area
  19. * @property Carbon $created_at
  20. * @property Carbon $updated_at
  21. * @property-read User|null $user
  22. * @method static Builder|UserLoginLog newModelQuery()
  23. * @method static Builder|UserLoginLog newQuery()
  24. * @method static Builder|UserLoginLog query()
  25. * @method static Builder|UserLoginLog whereArea($value)
  26. * @method static Builder|UserLoginLog whereCity($value)
  27. * @method static Builder|UserLoginLog whereCountry($value)
  28. * @method static Builder|UserLoginLog whereCounty($value)
  29. * @method static Builder|UserLoginLog whereCreatedAt($value)
  30. * @method static Builder|UserLoginLog whereId($value)
  31. * @method static Builder|UserLoginLog whereIp($value)
  32. * @method static Builder|UserLoginLog whereIsp($value)
  33. * @method static Builder|UserLoginLog whereProvince($value)
  34. * @method static Builder|UserLoginLog whereUpdatedAt($value)
  35. * @method static Builder|UserLoginLog whereUserId($value)
  36. * @mixin Eloquent
  37. */
  38. class UserLoginLog extends Model {
  39. protected $table = 'user_login_log';
  40. protected $primaryKey = 'id';
  41. function user() {
  42. return $this->hasOne(User::class, 'id', 'user_id');
  43. }
  44. }