<?php
namespace App\Entity;
use App\Repository\ObligesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ObligesRepository::class)
*/
class Obliges
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $societe;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private $photo;
/**
* @ORM\OneToMany(targetEntity=Deal::class, mappedBy="oblige")
*/
private $deals;
/**
* @ORM\OneToMany(targetEntity=ChampsObliges::class, mappedBy="obliges")
*/
private $champsobliges;
/**
* @ORM\OneToMany(targetEntity=ChampsObligesInstallateur::class, mappedBy="obliges")
*/
private $champsobligeinstallateur;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $siret;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenom;
/**
* @ORM\OneToOne(targetEntity=User::class, inversedBy="obliges", cascade={"persist", "remove"})
*/
private $user;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $archive;
/**
* @ORM\OneToMany(targetEntity=Dealoblige::class, mappedBy="oblige")
*/
private $dealobliges;
///siret ,nom prenom du dirigent
public function __construct()
{
$this->deals = new ArrayCollection();
$this->champsobliges = new ArrayCollection();
$this->champsobligeinstallateur = new ArrayCollection();
$this->dealobliges = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSociete(): ?string
{
return $this->societe;
}
public function setSociete(string $societe): self
{
$this->societe = $societe;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(string $photo): self
{
$this->photo = $photo;
return $this;
}
/**
* @return Collection<int, Deal>
*/
public function getDeals(): Collection
{
return $this->deals;
}
public function addDeal(Deal $deal): self
{
if (!$this->deals->contains($deal)) {
$this->deals[] = $deal;
$deal->setOblige($this);
}
return $this;
}
public function removeDeal(Deal $deal): self
{
if ($this->deals->removeElement($deal)) {
// set the owning side to null (unless already changed)
if ($deal->getOblige() === $this) {
$deal->setOblige(null);
}
}
return $this;
}
/**
* @return Collection<int, ChampsObliges>
*/
public function getChampsobliges(): Collection
{
return $this->champsobliges;
}
public function addChampsoblige(ChampsObliges $champsoblige): self
{
if (!$this->champsobliges->contains($champsoblige)) {
$this->champsobliges[] = $champsoblige;
$champsoblige->setObliges($this);
}
return $this;
}
public function removeChampsoblige(ChampsObliges $champsoblige): self
{
if ($this->champsobliges->removeElement($champsoblige)) {
// set the owning side to null (unless already changed)
if ($champsoblige->getObliges() === $this) {
$champsoblige->setObliges(null);
}
}
return $this;
}
/**
* @return Collection<int, ChampsObligesInstallateur>
*/
public function getChampsobligeinstallateur(): Collection
{
return $this->champsobligeinstallateur;
}
public function addChampsobligeinstallateur(ChampsObligesInstallateur $champsobligeinstallateur): self
{
if (!$this->champsobligeinstallateur->contains($champsobligeinstallateur)) {
$this->champsobligeinstallateur[] = $champsobligeinstallateur;
$champsobligeinstallateur->setObliges($this);
}
return $this;
}
public function removeChampsobligeinstallateur(ChampsObligesInstallateur $champsobligeinstallateur): self
{
if ($this->champsobligeinstallateur->removeElement($champsobligeinstallateur)) {
// set the owning side to null (unless already changed)
if ($champsobligeinstallateur->getObliges() === $this) {
$champsobligeinstallateur->setObliges(null);
}
}
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setSiret(?string $siret): self
{
$this->siret = $siret;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getArchive(): ?string
{
return $this->archive;
}
public function setArchive(?string $archive): self
{
$this->archive = $archive;
return $this;
}
/**
* @return Collection<int, Dealoblige>
*/
public function getDealobliges(): Collection
{
return $this->dealobliges;
}
public function addDealoblige(Dealoblige $dealoblige): self
{
if (!$this->dealobliges->contains($dealoblige)) {
$this->dealobliges[] = $dealoblige;
$dealoblige->setOblige($this);
}
return $this;
}
public function removeDealoblige(Dealoblige $dealoblige): self
{
if ($this->dealobliges->removeElement($dealoblige)) {
// set the owning side to null (unless already changed)
if ($dealoblige->getOblige() === $this) {
$dealoblige->setOblige(null);
}
}
return $this;
}
}