src/Entity/Location.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LocationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=LocationRepository::class)
  7.  */
  8. class Location
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="locations")
  18.      */
  19.     private $product;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=UserPlatform::class, inversedBy="locations")
  22.      */
  23.     private $user;
  24.     /**
  25.      * @ORM\Column(type="datetime", nullable=true)
  26.      */
  27.     private $startDate;
  28.     /**
  29.      * @ORM\Column(type="datetime", nullable=true)
  30.      */
  31.     private $endDate;
  32.     /**
  33.      * @ORM\Column(type="float", nullable=true)
  34.      */
  35.     private $price;
  36.     /**
  37.      * @ORM\Column(type="string", length=20, nullable=true)
  38.      */
  39.     private string $status = 'active';
  40.     /**
  41.      * @ORM\Column(type="datetime")
  42.      */
  43.     private $createdAt;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getProduct(): ?Product
  49.     {
  50.         return $this->product;
  51.     }
  52.     public function setProduct(?Product $product): self
  53.     {
  54.         $this->product = $product;
  55.         return $this;
  56.     }
  57.     public function getUser(): ?UserPlatform
  58.     {
  59.         return $this->user;
  60.     }
  61.     public function setUser(?UserPlatform $user): self
  62.     {
  63.         $this->user = $user;
  64.         return $this;
  65.     }
  66.     public function getStartDate(): ?\DateTimeInterface
  67.     {
  68.         return $this->startDate;
  69.     }
  70.     public function setStartDate(?\DateTimeInterface $startDate): self
  71.     {
  72.         $this->startDate = $startDate;
  73.         return $this;
  74.     }
  75.     public function getEndDate(): ?\DateTimeInterface
  76.     {
  77.         return $this->endDate;
  78.     }
  79.     public function setEndDate(?\DateTimeInterface $endDate): self
  80.     {
  81.         $this->endDate = $endDate;
  82.         return $this;
  83.     }
  84.     public function getPrice(): ?float
  85.     {
  86.         return $this->price;
  87.     }
  88.     public function setPrice(?float $price): self
  89.     {
  90.         $this->price = $price;
  91.         return $this;
  92.     }
  93.     public function getCreatedAt(): ?\DateTimeInterface
  94.     {
  95.         return $this->createdAt;
  96.     }
  97.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  98.     {
  99.         $this->createdAt = $createdAt;
  100.         return $this;
  101.     }
  102.     public function getStatus(): ?string
  103.     {
  104.         return $this->status;
  105.     }
  106.     public function setStatus(string $status): self
  107.     {
  108.         $this->status = $status;
  109.         return $this;
  110.     }
  111. }