diff --git a/app/Repositories/Import/Quickbooks/Contracts/RepositoryInterface.php b/app/Repositories/Import/Quickbooks/Contracts/RepositoryInterface.php new file mode 100644 index 000000000000..9bd07f7e01f2 --- /dev/null +++ b/app/Repositories/Import/Quickbooks/Contracts/RepositoryInterface.php @@ -0,0 +1,12 @@ +db= $db; + $this->transformer = $transfomer; + } + + public function count() : int { + return $this->db->totalRecords($this->entity); + } + + public function all() : Collection + { + return $this->get($this->count()); + } + + public function get(int $max = 100): Collection + { + return $this->transformer->transform($this->db->fetchRecords($this->entity, $max), $this->entity); + } + + +} \ No newline at end of file