src/Entity/MagasinUser.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MagasinUserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassMagasinUserRepository::class)]
  9. class MagasinUser
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column]
  16.     private ?bool $linked null;
  17.     #[ORM\ManyToOne(inversedBy'superadminlinkedmagasins')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?User $created_by null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  21.     private ?\DateTimeInterface $created_date null;
  22.     #[ORM\ManyToOne(inversedBy'magasinsuser')]
  23.     #[ORM\JoinColumn(nullabletrue)]
  24.     private ?User $user null;
  25.     #[ORM\ManyToOne(inversedBy'magasinsUser')]
  26.     #[ORM\JoinColumn(nullabletrue)]
  27.     private ?Magasin $magasin null;
  28.     public function __construct()
  29.     {
  30.        
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getLinked(): ?bool
  37.     {
  38.         return $this->linked;
  39.     }
  40.     public function setLinked(bool $linked): static
  41.     {
  42.         $this->linked $linked;
  43.         return $this;
  44.     }
  45.     public function getCreatedBy(): ?User
  46.     {
  47.         return $this->created_by;
  48.     }
  49.     public function setCreatedBy(?User $created_by): static
  50.     {
  51.         $this->created_by $created_by;
  52.         return $this;
  53.     }
  54.     public function getCreatedDate(): ?\DateTimeInterface
  55.     {
  56.         return $this->created_date;
  57.     }
  58.     public function setCreatedDate(\DateTimeInterface $created_date): static
  59.     {
  60.         $this->created_date $created_date;
  61.         return $this;
  62.     }
  63.     public function getUser(): ?User
  64.     {
  65.         return $this->user;
  66.     }
  67.     public function setUser(?User $user): static
  68.     {
  69.         $this->user $user;
  70.         return $this;
  71.     }
  72.     public function getMagasin(): ?Magasin
  73.     {
  74.         return $this->magasin;
  75.     }
  76.     public function setMagasin(?Magasin $magasin): static
  77.     {
  78.         $this->magasin $magasin;
  79.         return $this;
  80.     }
  81.     public function __toString(): string
  82.     {
  83.         return $this->magasin $this->magasin->getNom() : 'Magasin inconnu';
  84.     }
  85. }