src/Entity/UserEntreprise.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserEntrepriseRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassUserEntrepriseRepository::class)]
  6. class UserEntreprise
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'userEntreprises')]
  13.     private ?User $user null;
  14.     #[ORM\ManyToOne(inversedBy'userEntreprises')]
  15.     private ?Entreprise $entreprise null;
  16.     #[ORM\Column(length50)]
  17.     private ?string $role null;
  18.     #[ORM\Column]
  19.     private ?bool $status null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getUser(): ?User
  25.     {
  26.         return $this->user;
  27.     }
  28.     public function setUser(?User $user): static
  29.     {
  30.         $this->user $user;
  31.         return $this;
  32.     }
  33.     public function getEntreprise(): ?Entreprise
  34.     {
  35.         return $this->entreprise;
  36.     }
  37.     public function setEntreprise(?Entreprise $entreprise): static
  38.     {
  39.         $this->entreprise $entreprise;
  40.         return $this;
  41.     }
  42.     public function getRole(): ?string
  43.     {
  44.         return $this->role;
  45.     }
  46.     public function setRole(string $role): static
  47.     {
  48.         $this->role $role;
  49.         return $this;
  50.     }
  51.     public function isStatus(): ?bool
  52.     {
  53.         return $this->status;
  54.     }
  55.     public function setStatus(bool $status): static
  56.     {
  57.         $this->status $status;
  58.         return $this;
  59.     }
  60. }