TrackingLogic.php 603 B

12345678910111213141516171819202122232425
  1. <?php
  2. declare(strict_types=1);
  3. namespace app\logics;
  4. use app\model\Tracking as Model;
  5. class TrackingLogic
  6. {
  7. public static function list($condition = [], $page, $limit, $order = 'addtime desc')
  8. {
  9. $page = intval($page);
  10. $limit = intval($limit);
  11. $data = Model::field('id, employee_id,type, state, related_pics, addtime, remark')
  12. ->where($condition)->with('employee')->page($page, $limit)->order($order)->select();
  13. return $data;
  14. }
  15. public static function count($condition = [])
  16. {
  17. return Model::where($condition)->count();
  18. }
  19. }