src/Entity/AssistanteCommerciale.php line 11
<?phpnamespace App\Entity;use App\Repository\AssistanteCommercialeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AssistanteCommercialeRepository::class)]class AssistanteCommerciale{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255, nullable: true)]private ?string $nom = null;#[ORM\Column(length: 15, nullable: true)]private ?string $telephone = null;#[ORM\OneToMany(mappedBy: 'assistante', targetEntity: User::class)]private Collection $users;public function __construct(){$this->users = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNom(): ?string{return $this->nom;}public function setNom(?string $nom): self{$this->nom = $nom;return $this;}public function getTelephone(): ?string{return $this->telephone;}public function setTelephone(?string $telephone): self{$this->telephone = $telephone;return $this;}/*** @return Collection<int, User>*/public function getUsers(): Collection{return $this->users;}public function addUser(User $user): self{if (!$this->users->contains($user)) {$this->users->add($user);$user->setAssistante($this);}return $this;}public function removeUser(User $user): self{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getAssistante() === $this) {$user->setAssistante(null);}}return $this;}}