src/Entity/BillingAddress.php line 11
<?phpnamespace App\Entity;use App\Repository\BillingAddressRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: BillingAddressRepository::class)]class BillingAddress{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $billing_name = null;#[ORM\Column(length: 255)]private ?string $billing_surname = null;#[ORM\Column(length: 255)]private ?string $billing_street = null;#[ORM\Column(length: 255, nullable: true)]private ?string $billing_complementary = null;#[ORM\Column(length: 255)]private ?string $billing_city = null;#[ORM\Column(length: 255)]private ?string $billing_region = null;#[ORM\Column(length: 5)]private ?string $billing_postcode = null;#[ORM\Column(length: 10)]private ?string $billing_telephone = null;#[ORM\OneToMany(mappedBy: 'order_billing_address', targetEntity: Order::class)]private Collection $orders;public function __construct(){$this->orders = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getBillingName(): ?string{return $this->billing_name;}public function setBillingName(string $billing_name): self{$this->billing_name = $billing_name;return $this;}public function getBillingSurname(): ?string{return $this->billing_surname;}public function setBillingSurname(string $billing_surname): self{$this->billing_surname = $billing_surname;return $this;}public function getBillingStreet(): ?string{return $this->billing_street;}public function setBillingStreet(string $billing_street): self{$this->billing_street = $billing_street;return $this;}public function getBillingComplementary(): ?string{return $this->billing_complementary;}public function setBillingComplementary(?string $billing_complementary): self{$this->billing_complementary = $billing_complementary;return $this;}public function getBillingCity(): ?string{return $this->billing_city;}public function setBillingCity(string $billing_city): self{$this->billing_city = $billing_city;return $this;}public function getBillingRegion(): ?string{return $this->billing_region;}public function setBillingRegion(string $billing_region): self{$this->billing_region = $billing_region;return $this;}public function getBillingPostcode(): ?string{return $this->billing_postcode;}public function setBillingPostcode(string $billing_postcode): self{$this->billing_postcode = $billing_postcode;return $this;}public function getBillingTelephone(): ?string{return $this->billing_telephone;}public function setBillingTelephone(string $billing_telephone): self{$this->billing_telephone = $billing_telephone;return $this;}/*** @return Collection<int, Order>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Order $order): self{if (!$this->orders->contains($order)) {$this->orders->add($order);$order->setOrderBillingAddress($this);}return $this;}public function removeOrder(Order $order): self{if ($this->orders->removeElement($order)) {// set the owning side to null (unless already changed)if ($order->getOrderBillingAddress() === $this) {$order->setOrderBillingAddress(null);}}return $this;}public function __toString(): string{return $this->billing_name . ' ' . $this->billing_surname . ' ' . $this->billing_street . ' ' . $this->billing_complementary . ' ' . $this->billing_city . ' ' . $this->billing_region . ' ' . $this->billing_postcode . ' ' . $this->billing_telephone;}}