src/Entity/Kanban/Fiche.php line 29

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Kanban;
  3. use App\Entity\Clients\Client;
  4. use App\Entity\Fournisseurs\Fournisseur;
  5. use App\Entity\Notes\Note;
  6. use App\Entity\Projets\ProjetActivite;
  7. use App\Entity\Projets\ProjetDomaine;
  8. use App\Entity\Projets\ProjetUtilisateur;
  9. use App\Entity\Utilisateur\Contact;
  10. use App\Entity\Utilisateur\Utilisateur;
  11. use DateTime;
  12. use Doctrine\Common\Collections\ArrayCollection;
  13. use Doctrine\Common\Collections\Collection;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Gedmo\Mapping\Annotation as Gedmo;
  16. use Symfony\Component\Validator\Constraints as Assert;
  17. use App\Annotations\SecuredEntity;
  18. /**
  19.  * Fiche
  20.  *
  21.  * @ORM\Table("kanban__fiche")
  22.  * @ORM\Entity(repositoryClass="App\Repository\Kanban\FicheRepository")
  23.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  24.  * @SecuredEntity(name="Fiche", group="TACHES")
  25.  */
  26. class Fiche
  27. {
  28.     /**
  29.      * @ORM\Column(name="id", type="integer")
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue(strategy="AUTO")
  32.      */
  33.     private $id;
  34.     
  35.     /** 
  36.     * @ORM\OneToMany(targetEntity="App\Entity\Notes\Note", mappedBy="fiche")
  37.     */
  38.     private $notes;      
  39.     
  40.     /**
  41.      * @ORM\OneToMany(targetEntity="App\Entity\Kanban\FicheOrigine", cascade={"persist"}, mappedBy="fiche"))
  42.      */
  43.     private $ficheOrigine;    
  44.     
  45.     /**
  46.      * @var boolean
  47.      * @ORM\Column(name="fiable", type="boolean", nullable=true)
  48.      */
  49.     protected $probabiliteRentreParUtilisateur;
  50.     
  51.     /**
  52.      * @ORM\OneToMany(targetEntity="App\Entity\Kanban\Favoris", mappedBy="fiche")
  53.      */
  54.     private $favoris;    
  55.     
  56.     /**
  57.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  58.      */
  59.     private $reference;    
  60.     /**
  61.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  62.      * @Assert\NotBlank(message="LibellĂ© obligatoire.")
  63.      */
  64.     private $libelle;
  65.     /**
  66.      * @ORM\Column(name="date", type="datetime", nullable=true)
  67.      */
  68.     private $date;
  69.     
  70.     /**
  71.      * @ORM\Column(name="date_mail_80", type="datetime", nullable=true)
  72.      */
  73.     private $dateMail80;
  74.     
  75.     /**
  76.      * @ORM\Column(name="date_mail_100", type="datetime", nullable=true)
  77.      */
  78.     private $dateMail100;    
  79.     /**
  80.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  81.      */
  82.     private $dateSuppression;
  83.     /**
  84.      * @ORM\Column(name="datePrevisionelle", type="datetime", nullable=true)
  85.      */
  86.     private $datePrevisionelle;
  87.     /**
  88.      * @ORM\Column(name="budget", type="float", nullable=true)
  89.      */
  90.     private $budget;
  91.     
  92.     /**
  93.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  94.      * @ORM\JoinColumn(nullable=true)
  95.      */
  96.     private $utilisateur;
  97.     
  98.     /**
  99.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  100.      * @ORM\JoinColumn(nullable=true)
  101.      */
  102.     private $utilisateurGagnePerdu;
  103.     
  104.     /**
  105.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Region", inversedBy="fiche")
  106.      * @ORM\JoinColumn(nullable=true)    
  107.      */
  108.     private $region;
  109.     
  110.     /**
  111.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Concurrent")
  112.      * @ORM\JoinColumn(nullable=true)
  113.      */
  114.     private $concurrent;
  115.     
  116.     /**
  117.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client")
  118.      * @ORM\JoinColumn(nullable=true)      
  119.      */
  120.     private $client;
  121.     
  122.     /**
  123.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
  124.      * @ORM\JoinColumn(nullable=true)
  125.      */
  126.     private $contact;
  127.     
  128.     /**
  129.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Colonne", inversedBy="fiches")
  130.      * @ORM\JoinColumn(nullable=true)
  131.      * @Assert\NotBlank(message="Phase obligatoire")
  132.      */
  133.     private $colonne;    
  134.     
  135.     /**
  136.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\TypeContrat")
  137.      * @ORM\JoinColumn(nullable=true)
  138.      */
  139.     private $typeContrat;
  140.     
  141.     /**
  142.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Kanban")
  143.      * @ORM\JoinColumn(nullable=true)
  144.      * @Assert\NotBlank(message="Tunnel obligatoire")           
  145.      */
  146.     private $kanban;    
  147.     
  148.     /**
  149.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\StatutFiche")
  150.      * @ORM\JoinColumn(nullable=true)
  151.      */
  152.     private $statutFiche;
  153.     
  154.     /**
  155.      * @ORM\Column(name="description", type="text", nullable=true)
  156.     */
  157.     private $description;   
  158.     
  159.     /**
  160.      * @ORM\OneToMany(targetEntity="App\Entity\Kanban\Document", cascade={"persist"},mappedBy="fiche")
  161.      */
  162.     private $documents;
  163.     
  164.     /**
  165.      * @ORM\Column(name="dateDevisTechnique", type="datetime", nullable=true)
  166.      */
  167.     private $dateDevisTechnique;
  168.     /**
  169.      * @ORM\Column(name="reference_divalto", type="string", length=255, nullable=true)
  170.      */
  171.     private $referenceDivalto;
  172.     
  173.     /**
  174.      * @ORM\OneToMany(targetEntity="App\Entity\Kanban\Equipe", cascade={"persist"}, mappedBy="fiche")
  175.      */
  176.     private $equipe;
  177.     
  178.     /**
  179.      * @ORM\OneToMany(targetEntity="App\Entity\Kanban\FicheContact", cascade={"persist"}, mappedBy="fiche")
  180.      */
  181.     private $ficheContact;
  182.     
  183.     /**
  184.      * @ORM\Column(name="potentiel", type="integer", nullable=true)
  185.      */
  186.     private $potentiel;
  187.     
  188.     /**
  189.      * @ORM\Column(name="propabilite", type="integer", nullable=true)
  190.      */
  191.     private $propabilite;
  192.     
  193.     /**
  194.      * @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Raison")
  195.      * @ORM\JoinColumn(nullable=true)      
  196.      */
  197.     private $raison;
  198.     
  199.     /**
  200.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
  201.      * @ORM\JoinColumn(nullable=true)
  202.      */
  203.     private $apporteur
  204.     /**
  205.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  206.      * @ORM\JoinColumn(nullable=true)
  207.      */
  208.     private $chefProjet
  209.      /**
  210.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
  211.      * @ORM\JoinColumn(nullable=true)
  212.      */
  213.     private $commercial
  214.     /**
  215.      * @ORM\Column(name="id_import", type="string", length=255, nullable=true)
  216.      */
  217.     private $idImport;
  218.     /**
  219.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetDomaine", mappedBy="fiche")
  220.      */
  221.     private $projetDomaines;
  222.     /**
  223.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetActivite", mappedBy="fiche")
  224.      */
  225.     private $projetActivites;
  226.     /**
  227.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetUtilisateur", mappedBy="fiche")
  228.      */
  229.     private $projetUtilisateurs;
  230.     /**
  231.      * @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
  232.      */
  233.     private $dateLivraisonSouhaitee;
  234.     /**
  235.      * @ORM\Column(name="date_echeance", type="datetime", nullable=true)
  236.      */
  237.     private $dateEcheance;
  238.     /**
  239.      * @ORM\Column(name="numero_fiche", type="integer", nullable=true)
  240.      */
  241.     private $numeroFiche;
  242.     /**
  243.      * @ORM\Column(name="archive", type="boolean", nullable=true)
  244.      */
  245.     private $archive;
  246.     /**
  247.      * @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur")
  248.      * @ORM\JoinColumn(nullable=true)
  249.      */
  250.     private $mandataire;
  251.     
  252.     public function __toString()
  253.     {
  254.         return $this->libelle;
  255.     }    
  256.     public function __construct()
  257.     {
  258.         $this->date                 = new Datetime();
  259.         $this->projetUtilisateurs   = new ArrayCollection();
  260.         $this->projetActivites      = new ArrayCollection();
  261.         $this->projetDomaines       = new ArrayCollection();
  262.         $this->ficheOrigine          = new ArrayCollection();
  263.         $this->notes                = new ArrayCollection();
  264.         $this->ficheContact          = new ArrayCollection();
  265.         $this->equipe               = new ArrayCollection();
  266.         $this->favoris              = new ArrayCollection();
  267.         $this->documents            = new ArrayCollection();
  268.     }
  269.     public function getId(): int
  270.     {
  271.         return $this->id;
  272.     }
  273.     public function setLibelle(?string $libelle): Fiche
  274.     {
  275.         $this->libelle $libelle;
  276.         return $this;
  277.     }
  278.     public function getLibelle(): ?string
  279.     {
  280.         return $this->libelle;
  281.     }
  282.     public function setDate(?DateTime $date): Fiche
  283.     {
  284.         $this->date $date;
  285.         return $this;
  286.     }
  287.     public function getDate(): ?DateTime
  288.     {
  289.         return $this->date;
  290.     }
  291.     public function setDateSuppression(?DateTime $dateSuppression): Fiche
  292.     {
  293.         $this->dateSuppression $dateSuppression;
  294.         return $this;
  295.     }
  296.     public function getDateSuppression(): ?DateTime
  297.     {
  298.         return $this->dateSuppression;
  299.     }
  300.     public function setDatePrevisionelle(?DateTime $datePrevisionelle): Fiche
  301.     {
  302.         $this->datePrevisionelle $datePrevisionelle;
  303.         return $this;
  304.     }
  305.     public function getDatePrevisionelle(): ?DateTime
  306.     {
  307.         return $this->datePrevisionelle;
  308.     }
  309.     public function setBudget(?float $budget): Fiche
  310.     {
  311.         $this->budget $budget;
  312.         return $this;
  313.     }
  314.     public function getBudget(): ?float
  315.     {
  316.         return $this->budget;
  317.     }
  318.     public function setColonne(?Colonne $colonne): Fiche
  319.     {
  320.         $this->colonne $colonne;
  321.         return $this;
  322.     }
  323.     public function getColonne(): ?Colonne
  324.     {
  325.         return $this->colonne;
  326.     }
  327.     public function setStatutFiche(?StatutFiche $statutFiche): Fiche
  328.     {
  329.         $this->statutFiche $statutFiche;
  330.         return $this;
  331.     }
  332.     public function getStatutFiche(): ?StatutFiche
  333.     {
  334.         return $this->statutFiche;
  335.     }
  336.     public function setUtilisateur(?Utilisateur $utilisateur): Fiche
  337.     {
  338.         $this->utilisateur $utilisateur;
  339.         return $this;
  340.     }
  341.     public function getUtilisateur(): ?Utilisateur
  342.     {
  343.         return $this->utilisateur;
  344.     }
  345.     public function setClient(?Client $client): Fiche
  346.     {
  347.         $this->client $client;
  348.         return $this;
  349.     }
  350.     public function getClient(): ?Client
  351.     {
  352.         return $this->client;
  353.     }
  354.     public function setDescription(?string $description): Fiche
  355.     {
  356.         $this->description $description;
  357.         return $this;
  358.     }
  359.     public function getDescription(): ?string
  360.     {
  361.         return $this->description;
  362.     }
  363.     public function addDocument(Document $document): Fiche
  364.     {
  365.         $this->documents[] = $document;
  366.         return $this;
  367.     }
  368.     public function removeDocument(Document $document)
  369.     {
  370.         $this->documents->removeElement($document);
  371.     }
  372.     public function getDocuments(): Collection
  373.     {
  374.         return $this->documents;
  375.     }
  376.     public function setReference(?string $reference): Fiche
  377.     {
  378.         $this->reference $reference;
  379.         return $this;
  380.     }
  381.     public function getReference(): ?string
  382.     {
  383.         return $this->reference;
  384.     }
  385.     public function addFavori(Favoris $favori): Fiche
  386.     {
  387.         $this->favoris[] = $favori;
  388.         return $this;
  389.     }
  390.     public function removeFavori(Favoris $favori)
  391.     {
  392.         $this->favoris->removeElement($favori);
  393.     }
  394.     public function getFavoris(): Collection
  395.     {
  396.         return $this->favoris;
  397.     }
  398.     public function setContact(?Contact $contact): Fiche
  399.     {
  400.         $this->contact $contact;
  401.         return $this;
  402.     }
  403.     public function getContact(): ?Contact
  404.     {
  405.         return $this->contact;
  406.     }
  407.     public function setDateDevisTechnique(?DateTime $dateDevisTechnique): Fiche
  408.     {
  409.         $this->dateDevisTechnique $dateDevisTechnique;
  410.         return $this;
  411.     }
  412.     public function getDateDevisTechnique(): ?DateTime
  413.     {
  414.         return $this->dateDevisTechnique;
  415.     }
  416.     public function setReferenceDivalto(?string $referenceDivalto): Fiche
  417.     {
  418.         $this->referenceDivalto $referenceDivalto;
  419.         return $this;
  420.     }
  421.     public function getReferenceDivalto(): ?string
  422.     {
  423.         return $this->referenceDivalto;
  424.     }
  425.     public function addEquipe(Equipe $equipe): Fiche
  426.     {
  427.         $this->equipe[] = $equipe;
  428.         return $this;
  429.     }
  430.     public function removeEquipe(Equipe $equipe)
  431.     {
  432.         $this->equipe->removeElement($equipe);
  433.     }
  434.     public function getEquipe(): Collection
  435.     {
  436.         return $this->equipe;
  437.     }
  438.     public function setDateMail80(?DateTime $dateMail80): Fiche
  439.     {
  440.         $this->dateMail80 $dateMail80;
  441.         return $this;
  442.     }
  443.     public function getDateMail80(): ?DateTime
  444.     {
  445.         return $this->dateMail80;
  446.     }
  447.     public function setDateMail100(?DateTime $dateMail100): Fiche
  448.     {
  449.         $this->dateMail100 $dateMail100;
  450.         return $this;
  451.     }
  452.     public function getDateMail100(): ?DateTime
  453.     {
  454.         return $this->dateMail100;
  455.     }
  456.     public function setPotentiel(?int $potentiel): Fiche
  457.     {
  458.         $this->potentiel $potentiel;
  459.         return $this;
  460.     }
  461.     public function getPotentiel(): ?int
  462.     {
  463.         return $this->potentiel;
  464.     }
  465.     public function setRegion(?Region $region): Fiche
  466.     {
  467.         $this->region $region;
  468.         return $this;
  469.     }
  470.     public function getRegion(): ?Region
  471.     {
  472.         return $this->region;
  473.     }
  474.     public function setConcurrent(?Concurrent $concurrent): Fiche
  475.     {
  476.         $this->concurrent $concurrent;
  477.         return $this;
  478.     }
  479.     public function getConcurrent(): ?Concurrent
  480.     {
  481.         return $this->concurrent;
  482.     }
  483.     public function setKanban(?Kanban $kanban): Fiche
  484.     {
  485.         $this->kanban $kanban;
  486.         return $this;
  487.     }
  488.     public function getKanban(): ?Kanban
  489.     {
  490.         return $this->kanban;
  491.     }
  492.     public function setUtilisateurGagnePerdu(?Utilisateur $utilisateurGagnePerdu): Fiche
  493.     {
  494.         $this->utilisateurGagnePerdu $utilisateurGagnePerdu;
  495.         return $this;
  496.     }
  497.     public function getUtilisateurGagnePerdu(): ?Utilisateur
  498.     {
  499.         return $this->utilisateurGagnePerdu;
  500.     }
  501.     public function addFicheContact(FicheContact $ficheContact): Fiche
  502.     {
  503.         $this->ficheContact[] = $ficheContact;
  504.         return $this;
  505.     }
  506.     public function removeFicheContact(FicheContact $ficheContact)
  507.     {
  508.         $this->ficheContact->removeElement($ficheContact);
  509.     }
  510.     public function getFicheContact(): Collection
  511.     {
  512.         return $this->ficheContact;
  513.     }
  514.     public function setPropabilite(?int $propabilite): Fiche
  515.     {
  516.         $this->propabilite $propabilite;
  517.         return $this;
  518.     }
  519.     public function getPropabilite(): ?int
  520.     {
  521.         return $this->propabilite;
  522.     }
  523.     public function setProbabiliteRentreParUtilisateur(?bool $probabiliteRentreParUtilisateur): Fiche
  524.     {
  525.         $this->probabiliteRentreParUtilisateur $probabiliteRentreParUtilisateur;
  526.         return $this;
  527.     }
  528.     public function getProbabiliteRentreParUtilisateur(): ?bool
  529.     {
  530.         return $this->probabiliteRentreParUtilisateur;
  531.     }
  532.     public function setRaison(?Raison $raison): Fiche
  533.     {
  534.         $this->raison $raison;
  535.         return $this;
  536.     }
  537.     public function getRaison(): ?Raison
  538.     {
  539.         return $this->raison;
  540.     }
  541.     public function addNote(Note $note): Fiche
  542.     {
  543.         $this->notes[] = $note;
  544.         return $this;
  545.     }
  546.     public function removeNote(Note $note)
  547.     {
  548.         $this->notes->removeElement($note);
  549.     }
  550.     public function getNotes(): Collection
  551.     {
  552.         return $this->notes;
  553.     }
  554.     public function setTypeContrat(?TypeContrat $typeContrat): Fiche
  555.     {
  556.         $this->typeContrat $typeContrat;
  557.         return $this;
  558.     }
  559.     public function getTypeContrat(): ?TypeContrat
  560.     {
  561.         return $this->typeContrat;
  562.     }
  563.     public function addFicheOrigine(FicheOrigine $ficheOrigine): Fiche
  564.     {
  565.         $this->ficheOrigine[] = $ficheOrigine;
  566.         return $this;
  567.     }
  568.     public function removeFicheOrigine(FicheOrigine $ficheOrigine)
  569.     {
  570.         $this->ficheOrigine->removeElement($ficheOrigine);
  571.     }
  572.     public function getFicheOrigine(): Collection
  573.     {
  574.         return $this->ficheOrigine;
  575.     }
  576.     public function setChefProjet(?Utilisateur $chefProjet): Fiche
  577.     {
  578.         $this->chefProjet $chefProjet;
  579.         return $this;
  580.     }
  581.     public function getChefProjet(): ?Utilisateur
  582.     {
  583.         return $this->chefProjet;
  584.     }
  585.     public function setCommercial(?Utilisateur $commercial): Fiche
  586.     {
  587.         $this->commercial $commercial;
  588.         return $this;
  589.     }
  590.     public function getCommercial(): ?Utilisateur
  591.     {
  592.         return $this->commercial;
  593.     }
  594.     public function setIdImport(?string $idImport): Fiche
  595.     {
  596.         $this->idImport $idImport;
  597.         return $this;
  598.     }
  599.     public function getIdImport(): ?string
  600.     {
  601.         return $this->idImport;
  602.     }
  603.     public function addProjetDomaine(ProjetDomaine $projetDomaine): Fiche
  604.     {
  605.         $this->projetDomaines[] = $projetDomaine;
  606.         return $this;
  607.     }
  608.     public function removeProjetDomaine(ProjetDomaine $projetDomaine)
  609.     {
  610.         $this->projetDomaines->removeElement($projetDomaine);
  611.     }
  612.     public function getProjetDomaines(): Collection
  613.     {
  614.         return $this->projetDomaines;
  615.     }
  616.     public function addProjetActivite(ProjetActivite $projetActivite): Fiche
  617.     {
  618.         $this->projetActivites[] = $projetActivite;
  619.         return $this;
  620.     }
  621.     public function removeProjetActivite(ProjetActivite $projetActivite)
  622.     {
  623.         $this->projetActivites->removeElement($projetActivite);
  624.     }
  625.     public function getProjetActivites(): Collection
  626.     {
  627.         return $this->projetActivites;
  628.     }
  629.     public function setApporteur(?Contact $apporteur): Fiche
  630.     {
  631.         $this->apporteur $apporteur;
  632.         return $this;
  633.     }
  634.     public function getApporteur(): ?Contact
  635.     {
  636.         return $this->apporteur;
  637.     }
  638.     public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Fiche
  639.     {
  640.         $this->dateLivraisonSouhaitee $dateLivraisonSouhaitee;
  641.         return $this;
  642.     }
  643.     public function getDateLivraisonSouhaitee(): ?DateTime
  644.     {
  645.         return $this->dateLivraisonSouhaitee;
  646.     }
  647.     public function setDateEcheance(?DateTime $dateEcheance): Fiche
  648.     {
  649.         $this->dateEcheance $dateEcheance;
  650.         return $this;
  651.     }
  652.     public function getDateEcheance(): ?DateTime
  653.     {
  654.         return $this->dateEcheance;
  655.     }
  656.     public function addProjetUtilisateur(ProjetUtilisateur $projetUtilisateur): Fiche
  657.     {
  658.         $this->projetUtilisateurs[] = $projetUtilisateur;
  659.         return $this;
  660.     }
  661.     public function removeProjetUtilisateur(ProjetUtilisateur $projetUtilisateur)
  662.     {
  663.         $this->projetUtilisateurs->removeElement($projetUtilisateur);
  664.     }
  665.     public function getProjetUtilisateurs(): Collection
  666.     {
  667.         return $this->projetUtilisateurs;
  668.     }
  669.     public function setNumeroFiche(?int $numeroFiche): Fiche
  670.     {
  671.         $this->numeroFiche $numeroFiche;
  672.         return $this;
  673.     }
  674.     public function getNumeroFiche(): ?int
  675.     {
  676.         return $this->numeroFiche;
  677.     }
  678.     public function setArchive(?bool $archive): Fiche
  679.     {
  680.         $this->archive $archive;
  681.         return $this;
  682.     }
  683.     public function getArchive(): ?bool
  684.     {
  685.         return $this->archive;
  686.     }
  687.     public function setMandataire(?Fournisseur $mandataire): Fiche
  688.     {
  689.         $this->mandataire $mandataire;
  690.         return $this;
  691.     }
  692.     public function getMandataire(): ?Fournisseur
  693.     {
  694.         return $this->mandataire;
  695.     }
  696. }