Region.php 732 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Core;
  4. // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * Classe ... qui ...
  8. */
  9. // #[Auditable]
  10. #[ORM\Entity]
  11. class Region
  12. {
  13. #[ORM\Id]
  14. #[ORM\Column]
  15. #[ORM\GeneratedValue]
  16. private ?int $id = null;
  17. #[ORM\ManyToOne(targetEntity: Country::class, cascade: [])]
  18. #[ORM\JoinColumn(nullable: false)]
  19. protected Country $country;
  20. public function getId(): ?int
  21. {
  22. return $this->id;
  23. }
  24. function getCountry(): Country
  25. {
  26. return $this->country;
  27. }
  28. function setCountry(Country $country): self
  29. {
  30. $this->country = $country;
  31. return $this;
  32. }
  33. }