src/Entity/Offre.php line 12
<?phpnamespace App\Entity;use App\Repository\OffreRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: OffreRepository::class)]class Offre{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $nom = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $description = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: '0', nullable: true)]private ?string $prix = null;#[ORM\OneToMany(mappedBy: 'offre', 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): static{$this->nom = $nom;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): static{$this->description = $description;return $this;}public function getPrix(): ?string{return $this->prix;}public function setPrix(?string $prix): static{$this->prix = $prix;return $this;}/*** @return Collection<int, User>*/public function getUsers(): Collection{return $this->users;}public function addUser(User $user): static{if (!$this->users->contains($user)) {$this->users->add($user);$user->setOffre($this);}return $this;}public function removeUser(User $user): static{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getOffre() === $this) {$user->setOffre(null);}}return $this;}}