Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
src
/
Entity
/
//proc/self/root/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/src/Entity/Command.php
<?php namespace App\Entity; use App\Repository\CommandRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=CommandRepository::class) */ class Command { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="commands") */ private $user; /** * @ORM\Column(type="string", length=255) */ private $orderKey; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="string", length=255) */ private $stripeKey; /** * @ORM\Column(type="decimal", precision=10, scale=2) */ private $total; /** * @ORM\Column(type="string", length=255) */ private $billing; /** * @ORM\Column(type="string", length=255) */ private $firstname; /** * @ORM\Column(type="string", length=255) */ private $lastname; /** * @ORM\Column(type="string", length=255) */ private $email; /** * @ORM\Column(type="string", length=255) */ private $phone; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $address; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $additional; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $city; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $zipcode; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $country; /** * @ORM\ManyToOne(targetEntity=CommandType::class, inversedBy="commands", cascade={"persist"}) * @ORM\JoinColumn(nullable=false) */ private $type; /** * @ORM\OneToMany(targetEntity=CommandProduct::class, mappedBy="command", cascade={"persist"}) */ private $commandProducts; /** * @ORM\Column(type="datetime") */ private $dateDelivery; public function __construct(){ $this->createdAt = new \DateTime(); $this->commandProducts = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getOrderKey(): ?string { return $this->orderKey; } public function setOrderKey(string $orderKey): self { $this->orderKey = $orderKey; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getStripeKey(): ?string { return $this->stripeKey; } public function setStripeKey(string $stripeKey): self { $this->stripeKey = $stripeKey; return $this; } public function getTotal(): ?string { return $this->total; } public function setTotal(string $total): self { $this->total = $total; return $this; } public function getBilling(): ?string { return $this->billing; } public function setBilling(string $billing): self { $this->billing = $billing; return $this; } public function getFirstname(): ?string { return $this->firstname; } public function setFirstname(string $firstname): self { $this->firstname = $firstname; return $this; } public function getLastname(): ?string { return $this->lastname; } public function setLastname(string $lastname): self { $this->lastname = $lastname; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(string $phone): self { $this->phone = $phone; return $this; } public function getAddress(): ?string { return $this->address; } public function setAddress(?string $address): self { $this->address = $address; return $this; } public function getAdditional(): ?string { return $this->additional; } public function setAdditional(?string $additional): self { $this->additional = $additional; return $this; } public function getCity(): ?string { return $this->city; } public function setCity(?string $city): self { $this->city = $city; return $this; } public function getZipcode(): ?string { return $this->zipcode; } public function setZipcode(?string $zipcode): self { $this->zipcode = $zipcode; return $this; } public function getCountry(): ?string { return $this->country; } public function setCountry(?string $country): self { $this->country = $country; return $this; } public function getType(): ?CommandType { return $this->type; } public function setType(?CommandType $type): self { $this->type = $type; return $this; } /** * @return Collection<int, CommandProduct> */ public function getCommandProducts(): Collection { return $this->commandProducts; } public function addCommandProduct(CommandProduct $commandProduct): self { if (!$this->commandProducts->contains($commandProduct)) { $this->commandProducts[] = $commandProduct; $commandProduct->setCommand($this); } return $this; } public function removeCommandProduct(CommandProduct $commandProduct): self { if ($this->commandProducts->removeElement($commandProduct)) { // set the owning side to null (unless already changed) if ($commandProduct->getCommand() === $this) { $commandProduct->setCommand(null); } } return $this; } public function getDateDelivery(): ?\DateTimeInterface { return $this->dateDelivery; } public function setDateDelivery(\DateTimeInterface $dateDelivery): self { $this->dateDelivery = $dateDelivery; return $this; } }