src/Entity/Affaire.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AffaireRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAffaireRepository::class)]
  8. class Affaire
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $numeroAffaire;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $site;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $siteContact;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private $siteAdresse;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $siteCodePostal;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $siteVille;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     private $exigences;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     private $retourExp;
  30.     #[ORM\Column(type'text'nullabletrue)]
  31.     private $remarques;
  32.     #[ORM\ManyToOne(targetEntityCategorieAffaire::class, inversedBy'affaires'cascade: ['persist'])]
  33.     private $categorie;
  34.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'affaires'cascade: ['persist'])]
  35.     private $responsable;
  36.     #[ORM\ManyToOne(targetEntityClient::class, inversedBy'affaires'cascade: ['persist'])]
  37.     private $client;
  38.     #[ORM\OneToMany(targetEntityProposition::class, mappedBy'affaire'cascade: ['persist''remove'])]
  39.     private $propositions;
  40.     #[ORM\OneToMany(targetEntityDossier::class, mappedBy'affaire'cascade: ['persist''remove'])]
  41.     private $dossiers;
  42.     #[ORM\OneToMany(targetEntityCourrier::class, mappedBy'affaire'cascade: ['persist''remove'])]
  43.     private $courriers;
  44.     #[ORM\Column(type'datetime'nullabletrue)]
  45.     private $createdAt;
  46.     #[ORM\Column(type'datetime'nullabletrue)]
  47.     private $updatedAt;
  48.     #[ORM\OneToMany(targetEntityCommande::class, mappedBy'affaire'cascade: ['persist''remove'])]
  49.     private $commandes;
  50.     #[ORM\OneToMany(targetEntityFacture::class, mappedBy'affaire'cascade: ['persist''remove'])]
  51.     private $factures;
  52.     #[ORM\Column(type'string'length255nullabletrue)]
  53.     private $objet;
  54.     #[ORM\Column(type'boolean'nullabletrue)]
  55.     private $isDeleted;
  56.     #[ORM\Column(type'string'length255nullabletrue)]
  57.     private $siteContactTel;
  58.     #[ORM\Column(type'string'length255nullabletrue)]
  59.     private $siteContactMail;
  60.     #[ORM\ManyToOne(targetEntityAgence::class, cascade: ['persist'])]
  61.     private $agence;
  62.     private $proposition1;
  63.     private $proposition2;
  64.     private bool $copyClientSite;
  65.     private bool $duplicate false;
  66.     /**
  67.      * @return mixed
  68.      */
  69.     public function getProposition1()
  70.     {
  71.         return $this->proposition1;
  72.     }
  73.     /**
  74.      * @param mixed $proposition1
  75.      */
  76.     public function setProposition1($proposition1): void
  77.     {
  78.         $this->proposition1 $proposition1;
  79.     }
  80.     /**
  81.      * @return mixed
  82.      */
  83.     public function getProposition2()
  84.     {
  85.         return $this->proposition2;
  86.     }
  87.     /**
  88.      * @param mixed $proposition2
  89.      */
  90.     public function setProposition2($proposition2): void
  91.     {
  92.         $this->proposition2 $proposition2;
  93.     }
  94.     /**
  95.      * @return bool
  96.      */
  97.     public function isCopyClientSite(): bool
  98.     {
  99.         return $this->copyClientSite;
  100.     }
  101.     /**
  102.      * @param bool $copyClientSite
  103.      */
  104.     public function setCopyClientSite(bool $copyClientSite): void
  105.     {
  106.         $this->copyClientSite $copyClientSite;
  107.     }
  108.     /**
  109.      * @return bool
  110.      */
  111.     public function isDuplicate(): bool
  112.     {
  113.         return $this->duplicate;
  114.     }
  115.     /**
  116.      * @param bool $duplicate
  117.      */
  118.     public function setDuplicate(bool $duplicate): void
  119.     {
  120.         $this->duplicate $duplicate;
  121.     }
  122.     public function __toString()
  123.     {
  124.         return $this->getNumeroAffaire();
  125.     }
  126.     public function __construct()
  127.     {
  128.         $this->propositions = new ArrayCollection();
  129.         $this->dossiers = new ArrayCollection();
  130.         $this->courriers = new ArrayCollection();
  131.         $this->commandes = new ArrayCollection();
  132.         $this->factures = new ArrayCollection();
  133.         $this->setNumeroAffaire("Généré");
  134.         $this->setProposition1("Prop 1");
  135.         $this->setProposition2("Prop 2");
  136.     }
  137.     public function getId(): ?int
  138.     {
  139.         return $this->id;
  140.     }
  141.     public function getNumeroAffaire(): ?string
  142.     {
  143.         return $this->numeroAffaire;
  144.     }
  145.     public function setNumeroAffaire(?string $numeroAffaire): self
  146.     {
  147.         $this->numeroAffaire $numeroAffaire;
  148.         return $this;
  149.     }
  150.     public function getSite(): ?string
  151.     {
  152.         return $this->site;
  153.     }
  154.     public function setSite(?string $site): self
  155.     {
  156.         $this->site $site;
  157.         return $this;
  158.     }
  159.     public function getSiteContact(): ?string
  160.     {
  161.         return $this->siteContact;
  162.     }
  163.     public function setSiteContact(?string $siteContact): self
  164.     {
  165.         $this->siteContact $siteContact;
  166.         return $this;
  167.     }
  168.     public function getSiteAdresse(): ?string
  169.     {
  170.         return $this->siteAdresse;
  171.     }
  172.     public function setSiteAdresse(?string $siteAdresse): self
  173.     {
  174.         $this->siteAdresse $siteAdresse;
  175.         return $this;
  176.     }
  177.     public function getSiteCodePostal(): ?string
  178.     {
  179.         return $this->siteCodePostal;
  180.     }
  181.     public function setSiteCodePostal(?string $siteCodePostal): self
  182.     {
  183.         $this->siteCodePostal $siteCodePostal;
  184.         return $this;
  185.     }
  186.     public function getSiteVille(): ?string
  187.     {
  188.         return $this->siteVille;
  189.     }
  190.     public function setSiteVille(?string $siteVille): self
  191.     {
  192.         $this->siteVille $siteVille;
  193.         return $this;
  194.     }
  195.     public function getExigences(): ?string
  196.     {
  197.         return $this->exigences;
  198.     }
  199.     public function setExigences(?string $exigences): self
  200.     {
  201.         $this->exigences $exigences;
  202.         return $this;
  203.     }
  204.     public function getRetourExp(): ?string
  205.     {
  206.         return $this->retourExp;
  207.     }
  208.     public function setRetourExp(?string $retourExp): self
  209.     {
  210.         $this->retourExp $retourExp;
  211.         return $this;
  212.     }
  213.     public function getRemarques(): ?string
  214.     {
  215.         return $this->remarques;
  216.     }
  217.     public function setRemarques(?string $remarques): self
  218.     {
  219.         $this->remarques $remarques;
  220.         return $this;
  221.     }
  222.     public function getCategorie(): ?CategorieAffaire
  223.     {
  224.         return $this->categorie;
  225.     }
  226.     public function setCategorie(?CategorieAffaire $categorie): self
  227.     {
  228.         $this->categorie $categorie;
  229.         return $this;
  230.     }
  231.     public function getResponsable(): ?User
  232.     {
  233.         return $this->responsable;
  234.     }
  235.     public function setResponsable(?User $responsable): self
  236.     {
  237.         $this->responsable $responsable;
  238.         return $this;
  239.     }
  240.     public function getClient(): ?Client
  241.     {
  242.         return $this->client;
  243.     }
  244.     public function setClient(?Client $client): self
  245.     {
  246.         $this->client $client;
  247.         return $this;
  248.     }
  249.     /**
  250.      * @return Collection|Proposition[]
  251.      */
  252.     public function getPropositions(): Collection
  253.     {
  254.         return $this->propositions;
  255.     }
  256.     public function addProposition(Proposition $proposition): self
  257.     {
  258.         if (!$this->propositions->contains($proposition)) {
  259.             $this->propositions[] = $proposition;
  260.             $proposition->setAffaire($this);
  261.         }
  262.         return $this;
  263.     }
  264.     public function removeProposition(Proposition $proposition): self
  265.     {
  266.         if ($this->propositions->removeElement($proposition)) {
  267.             // set the owning side to null (unless already changed)
  268.             if ($proposition->getAffaire() === $this) {
  269.                 $proposition->setAffaire(null);
  270.             }
  271.         }
  272.         return $this;
  273.     }
  274.     /**
  275.      * @return Collection|Dossier[]
  276.      */
  277.     public function getDossiers(): Collection
  278.     {
  279.         return $this->dossiers;
  280.     }
  281.     public function addDossier(Dossier $dossier): self
  282.     {
  283.         if (!$this->dossiers->contains($dossier)) {
  284.             $this->dossiers[] = $dossier;
  285.             $dossier->setAffaire($this);
  286.         }
  287.         return $this;
  288.     }
  289.     public function removeDossier(Dossier $dossier): self
  290.     {
  291.         if ($this->dossiers->removeElement($dossier)) {
  292.             // set the owning side to null (unless already changed)
  293.             if ($dossier->getAffaire() === $this) {
  294.                 $dossier->setAffaire(null);
  295.             }
  296.         }
  297.         return $this;
  298.     }
  299.     /**
  300.      * @return Collection|Courrier[]
  301.      */
  302.     public function getCourriers(): Collection
  303.     {
  304.         return $this->courriers;
  305.     }
  306.     public function addCourrier(Courrier $courrier): self
  307.     {
  308.         if (!$this->courriers->contains($courrier)) {
  309.             $this->courriers[] = $courrier;
  310.             $courrier->setAffaire($this);
  311.         }
  312.         return $this;
  313.     }
  314.     public function removeCourrier(Courrier $courrier): self
  315.     {
  316.         if ($this->courriers->removeElement($courrier)) {
  317.             // set the owning side to null (unless already changed)
  318.             if ($courrier->getAffaire() === $this) {
  319.                 $courrier->setAffaire(null);
  320.             }
  321.         }
  322.         return $this;
  323.     }
  324.     public function getCreatedAt(): ?\DateTimeInterface
  325.     {
  326.         return $this->createdAt;
  327.     }
  328.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  329.     {
  330.         $this->createdAt $createdAt;
  331.         return $this;
  332.     }
  333.     public function getUpdatedAt(): ?\DateTimeInterface
  334.     {
  335.         return $this->updatedAt;
  336.     }
  337.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  338.     {
  339.         $this->updatedAt $updatedAt;
  340.         return $this;
  341.     }
  342.     /**
  343.      * @return Collection|Commande[]
  344.      */
  345.     public function getCommandes(): Collection
  346.     {
  347.         return $this->commandes;
  348.     }
  349.     public function addCommande(Commande $commande): self
  350.     {
  351.         if (!$this->commandes->contains($commande)) {
  352.             $this->commandes[] = $commande;
  353.             $commande->setAffaire($this);
  354.         }
  355.         return $this;
  356.     }
  357.     public function removeCommande(Commande $commande): self
  358.     {
  359.         if ($this->commandes->removeElement($commande)) {
  360.             // set the owning side to null (unless already changed)
  361.             if ($commande->getAffaire() === $this) {
  362.                 $commande->setAffaire(null);
  363.             }
  364.         }
  365.         return $this;
  366.     }
  367.     /**
  368.      * @return Collection|Facture[]
  369.      */
  370.     public function getFactures(): Collection
  371.     {
  372.         return $this->factures;
  373.     }
  374.     public function addFacture(Facture $facture): self
  375.     {
  376.         if (!$this->factures->contains($facture)) {
  377.             $this->factures[] = $facture;
  378.             $facture->setAffaire($this);
  379.         }
  380.         return $this;
  381.     }
  382.     public function removeFacture(Facture $facture): self
  383.     {
  384.         if ($this->factures->removeElement($facture)) {
  385.             // set the owning side to null (unless already changed)
  386.             if ($facture->getAffaire() === $this) {
  387.                 $facture->setAffaire(null);
  388.             }
  389.         }
  390.         return $this;
  391.     }
  392.     public function getObjet(): ?string
  393.     {
  394.         return $this->objet;
  395.     }
  396.     public function setObjet(?string $objet): self
  397.     {
  398.         $this->objet $objet;
  399.         return $this;
  400.     }
  401.     public function getIsDeleted(): ?bool
  402.     {
  403.         return $this->isDeleted;
  404.     }
  405.     public function setIsDeleted(?bool $isDeleted): self
  406.     {
  407.         $this->isDeleted $isDeleted;
  408.         return $this;
  409.     }
  410.     public function getSiteContactTel(): ?string
  411.     {
  412.         return $this->siteContactTel;
  413.     }
  414.     public function setSiteContactTel(?string $siteContactTel): self
  415.     {
  416.         $this->siteContactTel $siteContactTel;
  417.         return $this;
  418.     }
  419.     public function getSiteContactMail(): ?string
  420.     {
  421.         return $this->siteContactMail;
  422.     }
  423.     public function setSiteContactMail(?string $siteContactMail): self
  424.     {
  425.         $this->siteContactMail $siteContactMail;
  426.         return $this;
  427.     }
  428.     public function getAgence(): ?Agence
  429.     {
  430.         return $this->agence;
  431.     }
  432.     public function setAgence(?Agence $agence): self
  433.     {
  434.         $this->agence $agence;
  435.         return $this;
  436.     }
  437. }