src/Entity/ReferenceUserEstablishment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ReferenceUserEstablishmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ReferenceUserEstablishmentRepository::class)
  7.  */
  8. class ReferenceUserEstablishment
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="referenceUserEstablishments")
  18.      */
  19.     private $customer;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="leadReferenceUserEstablishments")
  22.      */
  23.     private $establishment;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="referenceUserEstablishments")
  26.      */
  27.     private $user;
  28.     /**
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $createdAt;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=Users::class)
  34.      */
  35.     private $createdBy;
  36.     public function __construct()
  37.     {
  38.         $this->createdAt = new \DateTime();
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getCustomer(): ?Establishments
  45.     {
  46.         return $this->customer;
  47.     }
  48.     public function setCustomer(?Establishments $customer): self
  49.     {
  50.         $this->customer $customer;
  51.         return $this;
  52.     }
  53.     public function getEstablishment(): ?Establishments
  54.     {
  55.         return $this->establishment;
  56.     }
  57.     public function setEstablishment(?Establishments $establishment): self
  58.     {
  59.         $this->establishment $establishment;
  60.         return $this;
  61.     }
  62.     public function getUser(): ?Users
  63.     {
  64.         return $this->user;
  65.     }
  66.     public function setUser(?Users $user): self
  67.     {
  68.         $this->user $user;
  69.         return $this;
  70.     }
  71.     public function getCreatedAt(): ?\DateTimeInterface
  72.     {
  73.         return $this->createdAt;
  74.     }
  75.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  76.     {
  77.         $this->createdAt $createdAt;
  78.         return $this;
  79.     }
  80.     public function getCreatedBy(): ?Users
  81.     {
  82.         return $this->createdBy;
  83.     }
  84.     public function setCreatedBy(?Users $createdBy): self
  85.     {
  86.         $this->createdBy $createdBy;
  87.         return $this;
  88.     }
  89. }