src/Entity/Projets/Projet.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Projets;
  3. use App\Entity\Clients\Client;
  4. use App\Entity\GestionComerciale\Commande;
  5. use App\Entity\Utilisateur\Utilisateur;
  6. use DateTime;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use Doctrine\ORM\Mapping\Index;
  13. /**
  14.  * Projet
  15.  *
  16.  * @ORM\Table(name="projet__projet")
  17.  * @ORM\Entity(repositoryClass="App\Repository\Projets\ProjetRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  19.  */
  20. class Projet
  21. {
  22.     /**
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="notes")
  31.      * @ORM\JoinColumn(nullable=true)
  32.      */
  33.     private $utilisateur;    
  34.     /**
  35.      * @ORM\Column(name="date", type="datetime", nullable=true)
  36.      */
  37.     private $date;
  38.     
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client")
  41.      * @ORM\JoinColumn(nullable=true)
  42.      */
  43.     private $client;    
  44.     
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\Tache", mappedBy="projet")
  47.      */
  48.     private $taches;
  49.     
  50.     /**
  51.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="projet", cascade={"persist"})
  52.     */
  53.     private $commandes;    
  54.     /**
  55.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  56.      */
  57.     private $dateSuppression;
  58.     /**
  59.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  60.      */
  61.     private $libelle;
  62.     /**
  63.      * @ORM\Column(name="description", type="text", nullable=true)
  64.      */
  65.     private $description;
  66.     /**
  67.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  68.      * @Gedmo\Timestampable(on="update")
  69.      */
  70.     private $dateMaj;
  71.     /**
  72.      * @ORM\Column(name="dateLivraison", type="datetime", nullable=true)
  73.      */
  74.     private $dateLivraison;
  75.     
  76.     /**
  77.      * @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
  78.      */
  79.     private $dateLivraisonSouhaitee;
  80.     
  81.     /**
  82.      * @ORM\Column(name="date_livraison_planifiee", type="datetime", nullable=true)
  83.      */
  84.     private $dateLivraisonPlanifiee;
  85.     
  86.     /**
  87.      * @ORM\Column(name="date_livraison_reelle", type="datetime", nullable=true)
  88.      */
  89.     private $dateLivraisonReelle;
  90.     
  91.     /**
  92.      * @ORM\Column(name="date_demarrage_planifiee", type="datetime", nullable=true)
  93.      */
  94.     private $dateDemarragePlanifiee;
  95.     
  96.     /**
  97.      * @ORM\Column(name="date_demarrage_reelle", type="datetime", nullable=true)
  98.      */
  99.     private $dateDemarrageReelle;
  100.     
  101.     /**
  102.      * @ORM\Column(name="date_signature_contrat", type="datetime", nullable=true)
  103.      */
  104.     private $dateSignatureContrat;
  105.     /**
  106.      * @ORM\Column(name="budget", type="float", length=255, nullable=true)
  107.      */
  108.     private $budget;
  109.     
  110.     /**
  111.      * @ORM\OneToMany(targetEntity="App\Entity\Projets\Document", cascade={"persist"},mappedBy="projet")
  112.      */
  113.     private $documents
  114.     
  115.     /**
  116.      * @ORM\Column(name="avancement", type="float", length=255, nullable=true)
  117.      */
  118.     private $avancement;
  119.     
  120.     /**
  121.      * @ORM\Column(name="nb_heures_prevues", type="float", length=255, nullable=true)
  122.      */
  123.     private $nbHeuresPrevues;
  124.     
  125.     /**
  126.      * @ORM\Column(name="nb_heures_passees", type="float", length=255, nullable=true)
  127.      */
  128.     private $nbHeuresPassees;
  129.     
  130.     /**
  131.      * @ORM\Column(name="date_archivage", type="datetime", nullable=true)
  132.      */
  133.     private $dateArchivage;
  134.     /**
  135.      * @ORM\Column(name="id_import", type="string",length=255, nullable=true)
  136.      */
  137.     private $idImport;
  138.     /**
  139.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  140.      */
  141.     private $reference;
  142.     /**
  143.      * @ORM\ManyToOne(targetEntity="App\Entity\Projets\Statut")
  144.      * @ORM\JoinColumn(nullable=true)
  145.      */
  146.     private $statut;
  147.     /**
  148.      * @ORM\ManyToOne(targetEntity="App\Entity\Projets\Priorite")
  149.      * @ORM\JoinColumn(nullable=true)
  150.      */
  151.     private $priorite;
  152.     /**
  153.      * @ORM\ManyToOne(targetEntity="App\Entity\Projets\TypeProjet")
  154.      * @ORM\JoinColumn(nullable=true)
  155.      */
  156.     private $type;
  157.     public function __construct()
  158.     {
  159.         $this->date                     = new Datetime();
  160.         $this->dateLivraisonPlanifiee    = new Datetime('2100-01-01 00:00:00');
  161.         $this->commandes                = new ArrayCollection();
  162.         $this->taches                   = new ArrayCollection();
  163.         $this->documents                = new ArrayCollection();
  164.     }
  165.     public function getId(): int
  166.     {
  167.         return $this->id;
  168.     }
  169.     public function setDate(DateTime $date): Projet
  170.     {
  171.         $this->date $date;
  172.         return $this;
  173.     }
  174.     public function getDate(): ?DateTime
  175.     {
  176.         return $this->date;
  177.     }
  178.     public function setDateSuppression(?DateTime $dateSuppression): Projet
  179.     {
  180.         $this->dateSuppression $dateSuppression;
  181.         return $this;
  182.     }
  183.     public function getDateSuppression(): ?DateTime
  184.     {
  185.         return $this->dateSuppression;
  186.     }
  187.     public function setLibelle(?string $libelle): Projet
  188.     {
  189.         $this->libelle $libelle;
  190.         return $this;
  191.     }
  192.     public function getLibelle(): ?string
  193.     {
  194.         return $this->libelle;
  195.     }
  196.     public function setDescription(?string $description): Projet
  197.     {
  198.         $this->description $description;
  199.         return $this;
  200.     }
  201.     public function getDescription(): ?string
  202.     {
  203.         return $this->description;
  204.     }
  205.     public function setDateMaj(?DateTime $dateMaj): Projet
  206.     {
  207.         $this->dateMaj $dateMaj;
  208.         return $this;
  209.     }
  210.     public function getDateMaj(): ?DateTime
  211.     {
  212.         return $this->dateMaj;
  213.     }
  214.     public function setDateLivraison(?DateTime $dateLivraison): Projet
  215.     {
  216.         $this->dateLivraison $dateLivraison;
  217.         return $this;
  218.     }
  219.     public function getDateLivraison(): ?DateTime
  220.     {
  221.         return $this->dateLivraison;
  222.     }
  223.     public function setBudget(?string $budget): Projet
  224.     {
  225.         $this->budget $budget;
  226.         return $this;
  227.     }
  228.     public function getBudget(): ?string
  229.     {
  230.         return $this->budget;
  231.     }
  232.     public function setClient(?Client $client): Projet
  233.     {
  234.         $this->client $client;
  235.         return $this;
  236.     }
  237.     public function getClient(): ?Client
  238.     {
  239.         return $this->client;
  240.     }
  241.     public function addDocument(Document $document): Projet
  242.     {
  243.         $this->documents[] = $document;
  244.         return $this;
  245.     }
  246.     public function removeDocument(Document $document)
  247.     {
  248.         $this->documents->removeElement($document);
  249.     }
  250.     public function getDocuments(): Collection
  251.     {
  252.         return $this->documents;
  253.     }
  254.     
  255.     public function __toString()
  256.     {
  257.         return $this->libelle
  258.     }    
  259.     public function setUtilisateur(?Utilisateur $utilisateur): Projet
  260.     {
  261.         $this->utilisateur $utilisateur;
  262.         return $this;
  263.     }
  264.     public function getUtilisateur(): ?Utilisateur
  265.     {
  266.         return $this->utilisateur;
  267.     }
  268.     public function addTach(Tache $tach): Projet
  269.     {
  270.         $this->taches[] = $tach;
  271.         return $this;
  272.     }
  273.     public function removeTach(Tache $tach)
  274.     {
  275.         $this->taches->removeElement($tach);
  276.     }
  277.     public function getTaches(): Collection
  278.     {
  279.         return $this->taches;
  280.     }
  281.     public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Projet
  282.     {
  283.         $this->dateLivraisonSouhaitee $dateLivraisonSouhaitee;
  284.         return $this;
  285.     }
  286.     public function getDateLivraisonSouhaitee(): ?DateTime
  287.     {
  288.         return $this->dateLivraisonSouhaitee;
  289.     }
  290.     public function setDateLivraisonPlanifiee(?DateTime $dateLivraisonPlanifiee): Projet
  291.     {
  292.         $this->dateLivraisonPlanifiee $dateLivraisonPlanifiee;
  293.         return $this;
  294.     }
  295.     public function getDateLivraisonPlanifiee(): ?DateTime
  296.     {
  297.         return $this->dateLivraisonPlanifiee;
  298.     }
  299.     public function setDateDemarragePlanifiee(?DateTime $dateDemarragePlanifiee): Projet
  300.     {
  301.         $this->dateDemarragePlanifiee $dateDemarragePlanifiee;
  302.         return $this;
  303.     }
  304.     public function getDateDemarragePlanifiee(): ?DateTime
  305.     {
  306.         return $this->dateDemarragePlanifiee;
  307.     }
  308.     public function setDateDemarrageReelle(?DateTime $dateDemarrageReelle): Projet
  309.     {
  310.         $this->dateDemarrageReelle $dateDemarrageReelle;
  311.         return $this;
  312.     }
  313.     public function getDateDemarrageReelle(): ?DateTime
  314.     {
  315.         return $this->dateDemarrageReelle;
  316.     }
  317.     public function setAvancement(?float $avancement): Projet
  318.     {
  319.         $this->avancement $avancement;
  320.         return $this;
  321.     }
  322.     public function getAvancement(): ?float
  323.     {
  324.         return $this->avancement;
  325.     }
  326.     public function setNbHeuresPrevues(?float $nbHeuresPrevues): Projet
  327.     {
  328.         $this->nbHeuresPrevues $nbHeuresPrevues;
  329.         return $this;
  330.     }
  331.     public function getNbHeuresPrevues(): ?float
  332.     {
  333.         return $this->nbHeuresPrevues;
  334.     }
  335.     public function setNbHeuresPassees(?float $nbHeuresPassees): Projet
  336.     {
  337.         $this->nbHeuresPassees $nbHeuresPassees;
  338.         return $this;
  339.     }
  340.     public function getNbHeuresPassees(): ?float
  341.     {
  342.         return $this->nbHeuresPassees;
  343.     }
  344.     public function setDateLivraisonReelle(?DateTime $dateLivraisonReelle): Projet
  345.     {
  346.         $this->dateLivraisonReelle $dateLivraisonReelle;
  347.         return $this;
  348.     }
  349.     public function getDateLivraisonReelle(): ?DateTime
  350.     {
  351.         return $this->dateLivraisonReelle;
  352.     }
  353.     public function setDateSignatureContrat(?DateTime $dateSignatureContrat): Projet
  354.     {
  355.         $this->dateSignatureContrat $dateSignatureContrat;
  356.         return $this;
  357.     }
  358.     public function getDateSignatureContrat(): ?DateTime
  359.     {
  360.         return $this->dateSignatureContrat;
  361.     }
  362.     public function setDateArchivage(?DateTime $dateArchivage): Projet
  363.     {
  364.         $this->dateArchivage $dateArchivage;
  365.         return $this;
  366.     }
  367.     public function getDateArchivage(): ?DateTime
  368.     {
  369.         return $this->dateArchivage;
  370.     }
  371.     public function addCommande(Commande $commande): Projet
  372.     {
  373.         $this->commandes[] = $commande;
  374.         $commande->setProjet($this);
  375.         return $this;
  376.     }
  377.     public function removeCommande(Commande $commande)
  378.     {
  379.         $this->commandes->removeElement($commande);
  380.         $commande->setProjet(NULL);
  381.     }
  382.     public function getCommandes(): Collection
  383.     {
  384.         return $this->commandes;
  385.     }
  386.     public function setIdImport(?string $idImport): Projet
  387.     {
  388.         $this->idImport $idImport;
  389.         return $this;
  390.     }
  391.     public function getIdImport(): ?string
  392.     {
  393.         return $this->idImport;
  394.     }
  395.     public function setReference(?string $reference): Projet
  396.     {
  397.         $this->reference $reference;
  398.         return $this;
  399.     }
  400.     public function getReference(): ?string
  401.     {
  402.         return $this->reference;
  403.     }
  404.     public function setStatut(?Statut $statut): Projet
  405.     {
  406.         $this->statut $statut;
  407.         return $this;
  408.     }
  409.     public function getStatut(): ?Statut
  410.     {
  411.         return $this->statut;
  412.     }
  413.     public function setPriorite(?Priorite $priorite): Projet
  414.     {
  415.         $this->priorite $priorite;
  416.         return $this;
  417.     }
  418.     public function getPriorite(): ?Priorite
  419.     {
  420.         return $this->priorite;
  421.     }
  422.     public function setType(?TypeProjet $type): Projet
  423.     {
  424.         $this->type $type;
  425.         return $this;
  426.     }
  427.     public function getType(): ?TypeProjet
  428.     {
  429.         return $this->type;
  430.     }
  431. }