src/Entity/TableUser.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TableUserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TableUserRepository::class)
  9.  */
  10. class TableUser
  11. {
  12.     const STATUS_ACCEPTED 'Accepté';
  13.     const STATUS_WAITING 'En attente';
  14.     const STATUS_DECLINED 'Refusé';
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Table::class, inversedBy="tableUsers", cascade={"persist"})
  27.      */
  28.     private $weddingTable;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Chambre::class, inversedBy="participant", cascade={"persist"})
  31.      */
  32.     private $chambre;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $mail;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $status;
  41.     /**
  42.      * @ORM\Column(type="boolean", nullable=true)
  43.      */
  44.     private $isSendInvitation;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="tableUsers")
  47.      * @ORM\JoinColumn(nullable=true)
  48.      */
  49.     private $userClient;
  50.     public function __construct()
  51.     {
  52.         $this->tableUsers = new ArrayCollection();
  53.         $this->status self::STATUS_WAITING;
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getName(): ?string
  60.     {
  61.         return $this->name;
  62.     }
  63.     public function setName(string $name): self
  64.     {
  65.         $this->name $name;
  66.         return $this;
  67.     }
  68.     public function getWeddingTable(): ?Table
  69.     {
  70.         return $this->weddingTable;
  71.     }
  72.     public function setWeddingTable(?Table $weddingTable): self
  73.     {
  74.         $this->weddingTable $weddingTable;
  75.         return $this;
  76.     }
  77.     public function getMail(): ?string
  78.     {
  79.         return $this->mail;
  80.     }
  81.     public function setMail(?string $mail): self
  82.     {
  83.         $this->mail $mail;
  84.         return $this;
  85.     }
  86.     public function getStatus(): ?string
  87.     {
  88.         return $this->status;
  89.     }
  90.     public function setStatus(?string $status): self
  91.     {
  92.         $this->status $status;
  93.         return $this;
  94.     }
  95.     public function getIsSendInvitation(): ?bool
  96.     {
  97.         return $this->isSendInvitation;
  98.     }
  99.     public function setIsSendInvitation(?bool $isSendInvitation): self
  100.     {
  101.         $this->isSendInvitation $isSendInvitation;
  102.         return $this;
  103.     }
  104.     public function getUserClient(): ?User
  105.     {
  106.         return $this->userClient;
  107.     }
  108.     public function setUserClient(?User $userClient): self
  109.     {
  110.         $this->userClient $userClient;
  111.         return $this;
  112.     }
  113.     public function getChambre(): ?Chambre
  114.     {
  115.         return $this->chambre;
  116.     }
  117.     public function setChambre(?Chambre $chambre): self
  118.     {
  119.         $this->chambre $chambre;
  120.         return $this;
  121.     }
  122. }