UserSubscribeLog.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * 用户订阅地址请求日志
  7. *
  8. * @property int $id
  9. * @property int|null $sid 对应user_subscribe的id
  10. * @property string|null $request_ip 请求IP
  11. * @property string|null $request_time 请求时间
  12. * @property string|null $request_header 请求头部信息
  13. * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\User[] $user
  14. * @property-read int|null $user_count
  15. * @method static Builder|UserSubscribeLog newModelQuery()
  16. * @method static Builder|UserSubscribeLog newQuery()
  17. * @method static Builder|UserSubscribeLog query()
  18. * @method static Builder|UserSubscribeLog whereId($value)
  19. * @method static Builder|UserSubscribeLog whereRequestHeader($value)
  20. * @method static Builder|UserSubscribeLog whereRequestIp($value)
  21. * @method static Builder|UserSubscribeLog whereRequestTime($value)
  22. * @method static Builder|UserSubscribeLog whereSid($value)
  23. * @mixin \Eloquent
  24. */
  25. class UserSubscribeLog extends Model {
  26. public $timestamps = false;
  27. protected $table = 'user_subscribe_log';
  28. protected $primaryKey = 'id';
  29. function user() {
  30. return $this->hasManyThrough(User::class, UserSubscribe::class, 'id', 'id', 'sid', 'user_id');
  31. }
  32. }