You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserVisit.php 604B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\model\user;
  3. use crmeb\basic\BaseModel;
  4. use crmeb\traits\ModelTrait;
  5. /**
  6. * Class UserVisit
  7. * @package app\model\user
  8. */
  9. class UserVisit extends BaseModel
  10. {
  11. use ModelTrait;
  12. /**
  13. * 数据表主键
  14. * @var string
  15. */
  16. protected $pk = 'id';
  17. /**
  18. * 模型名称
  19. * @var string
  20. */
  21. protected $name = 'user_visit';
  22. /**
  23. * 访问来源搜索器
  24. * @param $query
  25. * @param $value
  26. */
  27. public function searchChannelTypeAttr($query, $value)
  28. {
  29. if ($value != '') $query->where('channel_type', $value);
  30. }
  31. }