createCompanyProcessor = $createCompanyProcessor; $this->updatesCompanyStatus = $updatesCompanyStatus; $this->createCompanyModuleProcessor = $createCompanyModuleProcessor; $this->createContactProcessor = $createContactProcessor; $this->createsCompanyConnection = $createsCompanyConnection; $this->approvesCompanyConnection = $approvesCompanyConnection; $this->createAddressFromOldAddressProcessor = $createAddressFromOldAddressProcessor; $this->createsAddress = $createsAddress; $this->fetchesCompany = $fetchesCompany; $this->createsContact = $createsContact; } /** * Run the database seeds. * * @return void * @throws \App\Classes\Exceptions\AccessForbiddenException * @throws \App\Classes\Exceptions\MalformedRequestException * @throws \App\Classes\Exceptions\RequestValidationException */ public function run() { /** @var Company $company */ $company = $this->fetchesCompany->execute(['reference' => 'MODERN']); /** @var CompanyModule $companyModule */ $companyModule = $this->createCompanyModuleProcessor->execute($company, BusinessType::WAREHOUSE); $companyModule->update(['name' => 'Yiwu', 'reference' => 'YW-V02']); $address = new AddressObject('义乌市 后宅街道 起航路233号百汇科创园园区里面', '(进口处进来第一个路口左转至出口处右手边国际物流仓库)', 2, 27, 532, 322000, AddressType::BILLING, ApprovalStatus::APPROVED); $contact = new ContactObject('韩成名', '18058489899 / 18058929899', '', ''); $this->createsAddress->execute($companyModule, $address); $this->createsContact->execute($companyModule, $contact); $this->createsContact->execute($companyModule, $contact); } }