src/Entity/Addresses.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AddressesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAddressesRepository::class)]
  8. class Addresses
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityClinics::class, inversedBy'addresses')]
  15.     private $clinic;
  16.     #[ORM\Column(type'string'length255)]
  17.     private $address;
  18.     #[ORM\Column(type'boolean'nullabletrue)]
  19.     private $isDefault;
  20.     #[ORM\Column(type'datetime')]
  21.     private $modified;
  22.     #[ORM\Column(type'datetime')]
  23.     private $created;
  24.     #[ORM\OneToMany(targetEntityOrders::class, mappedBy'address')]
  25.     private $orders;
  26.     #[ORM\OneToMany(targetEntityOrders::class, mappedBy'billingAddress')]
  27.     private $billingAddress;
  28.     #[ORM\Column(type'string'length255)]
  29.     private $clinicName;
  30.     #[ORM\Column(type'string'length255)]
  31.     private $telephone;
  32.     #[ORM\Column(type'string'length255)]
  33.     private $city;
  34.     #[ORM\Column(type'string'length255)]
  35.     private $state;
  36.     #[ORM\Column(type'string'length255)]
  37.     private $postalCode;
  38.     #[ORM\Column(type'string'length255nullabletrue)]
  39.     private $suite;
  40.     #[ORM\Column(type'boolean'nullabletrue)]
  41.     private $isActive;
  42.     #[ORM\Column(type'integer'nullabletrue)]
  43.     private $type;
  44.     #[ORM\Column(type'boolean'nullabletrue)]
  45.     private $isDefaultBilling;
  46.     #[ORM\Column(type'string'length255nullabletrue)]
  47.     private $isoCode;
  48.     #[ORM\Column(type'string'length255nullabletrue)]
  49.     private $intlCode;
  50.     public function __construct()
  51.     {
  52.         $this->setCreated(new \DateTime());
  53.         if ($this->getModified() == null) {
  54.             $this->setModified(new \DateTime());
  55.         }
  56.         $this->orders = new ArrayCollection();
  57.     }
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     public function getClinic(): ?Clinics
  63.     {
  64.         return $this->clinic;
  65.     }
  66.     public function setClinic(?Clinics $clinic): self
  67.     {
  68.         $this->clinic $clinic;
  69.         return $this;
  70.     }
  71.     public function getAddress(): ?string
  72.     {
  73.         return $this->address;
  74.     }
  75.     public function setAddress(string $address): self
  76.     {
  77.         $this->address $address;
  78.         return $this;
  79.     }
  80.     public function getIsDefault(): ?bool
  81.     {
  82.         return $this->isDefault;
  83.     }
  84.     public function setIsDefault(bool $isDefault): self
  85.     {
  86.         $this->isDefault $isDefault;
  87.         return $this;
  88.     }
  89.     public function getModified(): ?\DateTimeInterface
  90.     {
  91.         return $this->modified;
  92.     }
  93.     public function setModified(\DateTimeInterface $modified): self
  94.     {
  95.         $this->modified $modified;
  96.         return $this;
  97.     }
  98.     public function getCreated(): ?\DateTimeInterface
  99.     {
  100.         return $this->created;
  101.     }
  102.     public function setCreated(\DateTimeInterface $created): self
  103.     {
  104.         $this->created $created;
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return Collection|Orders[]
  109.      */
  110.     public function getOrders(): Collection
  111.     {
  112.         return $this->orders;
  113.     }
  114.     public function addOrder(Orders $order): self
  115.     {
  116.         if (!$this->orders->contains($order)) {
  117.             $this->orders[] = $order;
  118.             $order->setAddress($this);
  119.         }
  120.         return $this;
  121.     }
  122.     public function removeOrder(Orders $order): self
  123.     {
  124.         if ($this->orders->removeElement($order)) {
  125.             // set the owning side to null (unless already changed)
  126.             if ($order->getAddress() === $this) {
  127.                 $order->setAddress(null);
  128.             }
  129.         }
  130.         return $this;
  131.     }
  132.     public function getClinicName(): ?string
  133.     {
  134.         return $this->clinicName;
  135.     }
  136.     public function setClinicName(string $clinicName): self
  137.     {
  138.         $this->clinicName $clinicName;
  139.         return $this;
  140.     }
  141.     public function getTelephone(): ?string
  142.     {
  143.         return $this->telephone;
  144.     }
  145.     public function setTelephone(string $telephone): self
  146.     {
  147.         $this->telephone $telephone;
  148.         return $this;
  149.     }
  150.     public function getCity(): ?string
  151.     {
  152.         return $this->city;
  153.     }
  154.     public function setCity(string $city): self
  155.     {
  156.         $this->city $city;
  157.         return $this;
  158.     }
  159.     public function getState(): ?string
  160.     {
  161.         return $this->state;
  162.     }
  163.     public function setState(string $state): self
  164.     {
  165.         $this->state $state;
  166.         return $this;
  167.     }
  168.     public function getPostalCode(): ?string
  169.     {
  170.         return $this->postalCode;
  171.     }
  172.     public function setPostalCode(string $postalCode): self
  173.     {
  174.         $this->postalCode $postalCode;
  175.         return $this;
  176.     }
  177.     public function getSuite(): ?string
  178.     {
  179.         return $this->suite;
  180.     }
  181.     public function setSuite(?string $suite): self
  182.     {
  183.         $this->suite $suite;
  184.         return $this;
  185.     }
  186.     public function getIsActive(): ?bool
  187.     {
  188.         return $this->isActive;
  189.     }
  190.     public function setIsActive(?bool $isActive): self
  191.     {
  192.         $this->isActive $isActive;
  193.         return $this;
  194.     }
  195.     public function getType(): ?int
  196.     {
  197.         return $this->type;
  198.     }
  199.     public function setType(?int $type): self
  200.     {
  201.         $this->type $type;
  202.         return $this;
  203.     }
  204.     public function getIsDefaultBilling(): ?bool
  205.     {
  206.         return $this->isDefaultBilling;
  207.     }
  208.     public function setIsDefaultBilling(?bool $isDefaultBilling): self
  209.     {
  210.         $this->isDefaultBilling $isDefaultBilling;
  211.         return $this;
  212.     }
  213.     public function getIsoCode(): ?string
  214.     {
  215.         return $this->isoCode;
  216.     }
  217.     public function setIsoCode(?string $isoCode): self
  218.     {
  219.         $this->isoCode $isoCode;
  220.         return $this;
  221.     }
  222.     public function getIntlCode(): ?string
  223.     {
  224.         return $this->intlCode;
  225.     }
  226.     public function setIntlCode(?string $intlCode): self
  227.     {
  228.         $this->intlCode $intlCode;
  229.         return $this;
  230.     }
  231. }