MoneyDetailRepositoryEloquent.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace App\Repositories\Eloquent;
  3. use Prettus\Repository\Eloquent\BaseRepository;
  4. use Prettus\Repository\Criteria\RequestCriteria;
  5. use App\Repositories\MoneyDetailRepository;
  6. use App\Models\MoneyDetail;
  7. use App\Validators\MoneyDetailValidator;
  8. /**
  9. * Class MoneyDetailRepositoryEloquent.
  10. *
  11. * @package namespace App\Repositories\Eloquent;
  12. */
  13. class MoneyDetailRepositoryEloquent extends BaseRepository implements MoneyDetailRepository
  14. {
  15. /**
  16. * 查询检索的字段
  17. *
  18. * @return string
  19. */
  20. protected $fieldSearchable = [
  21. 'id' => '=',
  22. 'd.type' => '=',
  23. 'd.status' => '=',
  24. 'nickname' => 'like',
  25. 'phone' => 'like',
  26. ];
  27. /**
  28. * Specify Model class name
  29. *
  30. * @return string
  31. */
  32. public function model()
  33. {
  34. return MoneyDetail::class;
  35. }
  36. /**
  37. * Specify Validator class name
  38. *
  39. * @return mixed
  40. */
  41. public function validator()
  42. {
  43. return MoneyDetailValidator::class;
  44. }
  45. /**
  46. * Boot up the repository, pushing criteria
  47. */
  48. public function boot()
  49. {
  50. // $this->pushCriteria(app(RequestCriteria::class));
  51. }
  52. }