SyncExamesJob.php 671 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Jobs;
  3. use App\Services\ExamesImportService;
  4. class SyncExamesJob extends BaseImportJob
  5. {
  6. public function __construct(
  7. string $filePath,
  8. string $importId,
  9. int $userId,
  10. protected int $partnerAgreementId,
  11. ) {
  12. parent::__construct(
  13. $filePath,
  14. $importId,
  15. $userId,
  16. );
  17. }
  18. protected function getImportType(): string
  19. {
  20. return 'exame';
  21. }
  22. protected function runSync(string $filePath): array
  23. {
  24. return app(ExamesImportService::class)->syncFromExcel(
  25. $filePath,
  26. $this->partnerAgreementId,
  27. );
  28. }
  29. }