UserGroup.php 732 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. *
  4. * @author: wuhaotian<442384644@qq.com>
  5. * @day: 2019/12/07
  6. */
  7. namespace app\admin\model\user;
  8. use crmeb\basic\BaseModel;
  9. use crmeb\traits\ModelTrait;
  10. /**
  11. * Class UserGroup
  12. * @package app\admin\model\user
  13. */
  14. class UserGroup extends BaseModel
  15. {
  16. /**
  17. * 数据表主键
  18. * @var string
  19. */
  20. protected $pk = 'id';
  21. /**
  22. * 模型名称
  23. * @var string
  24. */
  25. protected $name = 'user_group';
  26. use ModelTrait;
  27. /**
  28. * @param $where
  29. * @return array
  30. */
  31. public static function getList($where)
  32. {
  33. $data = self::page((int)$where['page'], (int)$where['limit'])->select();
  34. $count = $data->count();
  35. return compact('count', 'data');
  36. }
  37. }