Game.php 526 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\v1\model\center;
  3. use plugin\saiadmin\basic\BaseModel;
  4. /**
  5. * 游戏列表模型
  6. */
  7. class Game extends BaseModel
  8. {
  9. protected $connection = 'db_center';
  10. /**
  11. * 数据表主键
  12. * @var string
  13. */
  14. protected $pk = 'id';
  15. /**
  16. * 数据库表名称
  17. * @var string
  18. */
  19. protected $table = 'pf_game';
  20. /**
  21. * 游戏名称 搜索
  22. */
  23. public function searchNameAttr($query, $value)
  24. {
  25. $query->where('name', 'like', '%'.$value.'%');
  26. }
  27. }