LalaSpExchange.php 762 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace app\models\lala;
  3. use crmeb\traits\ModelTrait;
  4. use crmeb\basic\BaseModel;
  5. /**
  6. * TODO 文章Model
  7. * Class Article
  8. * @package app\models\article
  9. */
  10. class LalaSpExchange extends BaseModel
  11. {
  12. /**
  13. * 数据表主键
  14. * @var string
  15. */
  16. protected $pk = 'id';
  17. /**
  18. * 模型名称
  19. * @var string
  20. */
  21. protected $name = 'lala_sp_exchange';
  22. use ModelTrait;
  23. /**
  24. * @param $where
  25. * @param $page
  26. * @param $limit
  27. * @return array
  28. */
  29. public static function getList($where, $page, $limit): array
  30. {
  31. $model = new self();
  32. $list = $model->page((int)$page, (int)$limit)->select();
  33. $count = $model->count();
  34. return compact('list', 'count');
  35. }
  36. }