CustomerRepositoryInterface.php 963 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Shop\Customers\Repositories\Interfaces;
  3. use App\Shop\Addresses\Address;
  4. use Jsdecena\Baserepo\BaseRepositoryInterface;
  5. use App\Shop\Customers\Customer;
  6. use Illuminate\Database\Eloquent\Collection;
  7. use Illuminate\Support\Collection as Support;
  8. interface CustomerRepositoryInterface extends BaseRepositoryInterface
  9. {
  10. public function listCustomers(string $order = 'id', string $sort = 'desc', array $columns = ['*']) : Support;
  11. public function createCustomer(array $params) : Customer;
  12. public function updateCustomer(array $params) : bool;
  13. public function findCustomerById(int $id) : Customer;
  14. public function deleteCustomer() : bool;
  15. public function attachAddress(Address $address) : Address;
  16. public function findAddresses() : Support;
  17. public function findOrders() : Collection;
  18. public function searchCustomer(string $text) : Collection;
  19. public function charge(int $amount, array $options);
  20. }