diff --git a/config/services.yaml b/config/services.yaml index 1e5a5fa..106273d 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -20,7 +20,7 @@ services: - '../src/Entity/' - '../src/Kernel.php' App\Controller\: - resource: '../src/App/Controller' + resource: '../src/Controller' tags: ['controller.service_arguments'] # add more service definitions when explicit configuration is needed diff --git a/src/Component/Customer/Infrastructure/CustomerDatabaseAdapter.php b/src/Component/Customer/Infrastructure/CustomerDatabaseAdapter.php new file mode 100644 index 0000000..19d5f0c --- /dev/null +++ b/src/Component/Customer/Infrastructure/CustomerDatabaseAdapter.php @@ -0,0 +1,29 @@ +id; + } + + /** + * @param int $id + */ + public function setId(int $id): void + { + $this->id = $id; + } + + /** + * @return string + */ + public function getLabel(): string + { + return $this->label; + } + + /** + * @param string $label + */ + public function setLabel(string $label): void + { + $this->label = $label; + } + + /** + * @return \DateTime + */ + public function getCreated(): \DateTime + { + return $this->created; + } + + /** + * @param \DateTime $created + */ + public function setCreated(\DateTime $created): void + { + $this->created = $created; + } + + /** + * @return \DateTime + */ + public function getUpdated(): \DateTime + { + return $this->updated; + } + + /** + * @param \DateTime $updated + */ + public function setUpdated(\DateTime $updated): void + { + $this->updated = $updated; + } + +} \ No newline at end of file diff --git a/src/Component/Material/Domain/MaterialDataMapper.php b/src/Component/Material/Domain/MaterialDataMapper.php new file mode 100644 index 0000000..7ac4d19 --- /dev/null +++ b/src/Component/Material/Domain/MaterialDataMapper.php @@ -0,0 +1,8 @@ +id; + } + + /** + * @param int $id + */ + public function setId(int $id): void + { + $this->id = $id; + } + + /** + * @return Printer + */ + public function getPrinter(): Printer + { + return $this->printer; + } + + /** + * @param Printer $printer + */ + public function setPrinter(Printer $printer): void + { + $this->printer = $printer; + } + + /** + * @return Customer + */ + public function getCustomer(): Customer + { + return $this->customer; + } + + /** + * @param Customer $customer + */ + public function setCustomer(Customer $customer): void + { + $this->customer = $customer; + } + + /** + * @return Spool + */ + public function getSpool(): Spool + { + return $this->spool; + } + + /** + * @param Spool $spool + */ + public function setSpool(Spool $spool): void + { + $this->spool = $spool; + } + + /** + * @return float + */ + public function getPrintWeights(): float + { + return $this->printWeights; + } + + /** + * @param float $printWeights + */ + public function setPrintWeights(float $printWeights): void + { + $this->printWeights = $printWeights; + } + + /** + * @return int + */ + public function getPrintMinutes(): int + { + return $this->printMinutes; + } + + /** + * @param int $printMinutes + */ + public function setPrintMinutes(int $printMinutes): void + { + $this->printMinutes = $printMinutes; + } + + /** + * @return int + */ + public function getPrintHours(): int + { + return $this->printHours; + } + + /** + * @param int $printHours + */ + public function setPrintHours(int $printHours): void + { + $this->printHours = $printHours; + } + + /** + * @return int + */ + public function getUserHourlyCost(): int + { + return $this->userHourlyCost; + } + + /** + * @param int $userHourlyCost + */ + public function setUserHourlyCost(int $userHourlyCost): void + { + $this->userHourlyCost = $userHourlyCost; + } + + /** + * @return float + */ + public function getSellPrice(): float + { + return $this->sellPrice; + } + + /** + * @param float $sellPrice + */ + public function setSellPrice(float $sellPrice): void + { + $this->sellPrice = $sellPrice; + } + + /** + * @return File + */ + public function getFile(): File + { + return $this->file; + } + + /** + * @param File $file + */ + public function setFile(File $file): void + { + $this->file = $file; + } + + /** + * @return int + */ + public function getStatus(): int + { + return $this->status; + } + + /** + * @param int $status + */ + public function setStatus(int $status): void + { + $this->status = $status; + } + + /** + * @return \DateTime + */ + public function getCreated(): \DateTime + { + return $this->created; + } + + /** + * @param \DateTime $created + */ + public function setCreated(\DateTime $created): void + { + $this->created = $created; + } + + /** + * @return \DateTime + */ + public function getUpdated(): \DateTime + { + return $this->updated; + } + + /** + * @param \DateTime $updated + */ + public function setUpdated(\DateTime $updated): void + { + $this->updated = $updated; + } + +} \ No newline at end of file diff --git a/src/Component/Order/Domain/OrderDataMapper.php b/src/Component/Order/Domain/OrderDataMapper.php new file mode 100644 index 0000000..915c169 --- /dev/null +++ b/src/Component/Order/Domain/OrderDataMapper.php @@ -0,0 +1,8 @@ +users = new ArrayCollection(); } /** @@ -59,4 +68,52 @@ class Role $this->name = $name; } + /** + * @return Collection + */ + public function getUsers(): Collection + { + return $this->users; + } + + /** + * @param Collection $user + */ + public function setUsers(Collection $users): void + { + $this->users = $users; + } + + /** + * @return \DateTime + */ + public function getCreated(): \DateTime + { + return $this->created; + } + + /** + * @param \DateTime $created + */ + public function setCreated(\DateTime $created): void + { + $this->created = $created; + } + + /** + * @return \DateTime + */ + public function getUpdated(): \DateTime + { + return $this->updated; + } + + /** + * @param \DateTime $updated + */ + public function setUpdated(\DateTime $updated): void + { + $this->updated = $updated; + } + } \ No newline at end of file diff --git a/src/Component/Role/Infrastructure/RoleDatabaseAdapter.php b/src/Component/Role/Infrastructure/RoleDatabaseAdapter.php index 9428928..01dee47 100644 --- a/src/Component/Role/Infrastructure/RoleDatabaseAdapter.php +++ b/src/Component/Role/Infrastructure/RoleDatabaseAdapter.php @@ -19,16 +19,16 @@ class RoleDatabaseAdapter extends ServiceEntityRepository implements RoleDataMap public function findById(int $id): Role { - $user = $this->find($id); + $role = $this->find($id); - if (!$user) + if (!$role) { throw new Exception( - 'L\'utilisateur n\'existe pas' + 'Le role n\'existe pas' ); } - return $user; + return $role; } public function findAll(): array diff --git a/src/Component/Spool/Domain/Spool.php b/src/Component/Spool/Domain/Spool.php new file mode 100644 index 0000000..d7a6829 --- /dev/null +++ b/src/Component/Spool/Domain/Spool.php @@ -0,0 +1,8 @@ +findById(1); + dd($user->getRole()->getUsers()); return new Response( $user->getId(). " " .$user->getName(), Response::HTTP_OK,