AddressRepositoryInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Shop\Addresses\Repositories\Interfaces;
  3. use App\Shop\Addresses\Address;
  4. use App\Shop\Cities\City;
  5. use App\Shop\Countries\Country;
  6. use App\Shop\Customers\Customer;
  7. use App\Shop\Provinces\Province;
  8. use Illuminate\Support\Collection;
  9. use Jsdecena\Baserepo\BaseRepositoryInterface;
  10. interface AddressRepositoryInterface extends BaseRepositoryInterface
  11. {
  12. public function createAddress(array $params) : Address;
  13. public function attachToCustomer(Address $address, Customer $customer);
  14. public function updateAddress(array $update): bool;
  15. public function deleteAddress();
  16. public function listAddress(string $order = 'id', string $sort = 'desc', array $columns = ['*']) : Collection;
  17. public function findAddressById(int $id) : Address;
  18. public function findCustomer() : Customer;
  19. public function searchAddress(string $text) : Collection;
  20. public function findCountry() : Country;
  21. public function findProvince() : Province;
  22. public function findCity() : City;
  23. }