<?php
namespace App\Entity\Projets;
use App\Entity\Clients\Client;
use App\Entity\GestionComerciale\Commande;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping\Index;
/**
* Projet
*
* @ORM\Table(name="projet__projet")
* @ORM\Entity(repositoryClass="App\Repository\Projets\ProjetRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
*/
class Projet
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="notes")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client")
* @ORM\JoinColumn(nullable=true)
*/
private $client;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\Tache", mappedBy="projet")
*/
private $taches;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="projet", cascade={"persist"})
*/
private $commandes;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\Column(name="dateLivraison", type="datetime", nullable=true)
*/
private $dateLivraison;
/**
* @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
*/
private $dateLivraisonSouhaitee;
/**
* @ORM\Column(name="date_livraison_planifiee", type="datetime", nullable=true)
*/
private $dateLivraisonPlanifiee;
/**
* @ORM\Column(name="date_livraison_reelle", type="datetime", nullable=true)
*/
private $dateLivraisonReelle;
/**
* @ORM\Column(name="date_demarrage_planifiee", type="datetime", nullable=true)
*/
private $dateDemarragePlanifiee;
/**
* @ORM\Column(name="date_demarrage_reelle", type="datetime", nullable=true)
*/
private $dateDemarrageReelle;
/**
* @ORM\Column(name="date_signature_contrat", type="datetime", nullable=true)
*/
private $dateSignatureContrat;
/**
* @ORM\Column(name="budget", type="float", length=255, nullable=true)
*/
private $budget;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\Document", cascade={"persist"},mappedBy="projet")
*/
private $documents;
/**
* @ORM\Column(name="avancement", type="float", length=255, nullable=true)
*/
private $avancement;
/**
* @ORM\Column(name="nb_heures_prevues", type="float", length=255, nullable=true)
*/
private $nbHeuresPrevues;
/**
* @ORM\Column(name="nb_heures_passees", type="float", length=255, nullable=true)
*/
private $nbHeuresPassees;
/**
* @ORM\Column(name="date_archivage", type="datetime", nullable=true)
*/
private $dateArchivage;
/**
* @ORM\Column(name="id_import", type="string",length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Projets\Statut")
* @ORM\JoinColumn(nullable=true)
*/
private $statut;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Projets\Priorite")
* @ORM\JoinColumn(nullable=true)
*/
private $priorite;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Projets\TypeProjet")
* @ORM\JoinColumn(nullable=true)
*/
private $type;
public function __construct()
{
$this->date = new Datetime();
$this->dateLivraisonPlanifiee = new Datetime('2100-01-01 00:00:00');
$this->commandes = new ArrayCollection();
$this->taches = new ArrayCollection();
$this->documents = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setDate(DateTime $date): Projet
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Projet
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setLibelle(?string $libelle): Projet
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDescription(?string $description): Projet
{
$this->description = $description;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDateMaj(?DateTime $dateMaj): Projet
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setDateLivraison(?DateTime $dateLivraison): Projet
{
$this->dateLivraison = $dateLivraison;
return $this;
}
public function getDateLivraison(): ?DateTime
{
return $this->dateLivraison;
}
public function setBudget(?string $budget): Projet
{
$this->budget = $budget;
return $this;
}
public function getBudget(): ?string
{
return $this->budget;
}
public function setClient(?Client $client): Projet
{
$this->client = $client;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function addDocument(Document $document): Projet
{
$this->documents[] = $document;
return $this;
}
public function removeDocument(Document $document)
{
$this->documents->removeElement($document);
}
public function getDocuments(): Collection
{
return $this->documents;
}
public function __toString()
{
return $this->libelle;
}
public function setUtilisateur(?Utilisateur $utilisateur): Projet
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function addTach(Tache $tach): Projet
{
$this->taches[] = $tach;
return $this;
}
public function removeTach(Tache $tach)
{
$this->taches->removeElement($tach);
}
public function getTaches(): Collection
{
return $this->taches;
}
public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Projet
{
$this->dateLivraisonSouhaitee = $dateLivraisonSouhaitee;
return $this;
}
public function getDateLivraisonSouhaitee(): ?DateTime
{
return $this->dateLivraisonSouhaitee;
}
public function setDateLivraisonPlanifiee(?DateTime $dateLivraisonPlanifiee): Projet
{
$this->dateLivraisonPlanifiee = $dateLivraisonPlanifiee;
return $this;
}
public function getDateLivraisonPlanifiee(): ?DateTime
{
return $this->dateLivraisonPlanifiee;
}
public function setDateDemarragePlanifiee(?DateTime $dateDemarragePlanifiee): Projet
{
$this->dateDemarragePlanifiee = $dateDemarragePlanifiee;
return $this;
}
public function getDateDemarragePlanifiee(): ?DateTime
{
return $this->dateDemarragePlanifiee;
}
public function setDateDemarrageReelle(?DateTime $dateDemarrageReelle): Projet
{
$this->dateDemarrageReelle = $dateDemarrageReelle;
return $this;
}
public function getDateDemarrageReelle(): ?DateTime
{
return $this->dateDemarrageReelle;
}
public function setAvancement(?float $avancement): Projet
{
$this->avancement = $avancement;
return $this;
}
public function getAvancement(): ?float
{
return $this->avancement;
}
public function setNbHeuresPrevues(?float $nbHeuresPrevues): Projet
{
$this->nbHeuresPrevues = $nbHeuresPrevues;
return $this;
}
public function getNbHeuresPrevues(): ?float
{
return $this->nbHeuresPrevues;
}
public function setNbHeuresPassees(?float $nbHeuresPassees): Projet
{
$this->nbHeuresPassees = $nbHeuresPassees;
return $this;
}
public function getNbHeuresPassees(): ?float
{
return $this->nbHeuresPassees;
}
public function setDateLivraisonReelle(?DateTime $dateLivraisonReelle): Projet
{
$this->dateLivraisonReelle = $dateLivraisonReelle;
return $this;
}
public function getDateLivraisonReelle(): ?DateTime
{
return $this->dateLivraisonReelle;
}
public function setDateSignatureContrat(?DateTime $dateSignatureContrat): Projet
{
$this->dateSignatureContrat = $dateSignatureContrat;
return $this;
}
public function getDateSignatureContrat(): ?DateTime
{
return $this->dateSignatureContrat;
}
public function setDateArchivage(?DateTime $dateArchivage): Projet
{
$this->dateArchivage = $dateArchivage;
return $this;
}
public function getDateArchivage(): ?DateTime
{
return $this->dateArchivage;
}
public function addCommande(Commande $commande): Projet
{
$this->commandes[] = $commande;
$commande->setProjet($this);
return $this;
}
public function removeCommande(Commande $commande)
{
$this->commandes->removeElement($commande);
$commande->setProjet(NULL);
}
public function getCommandes(): Collection
{
return $this->commandes;
}
public function setIdImport(?string $idImport): Projet
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setReference(?string $reference): Projet
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setStatut(?Statut $statut): Projet
{
$this->statut = $statut;
return $this;
}
public function getStatut(): ?Statut
{
return $this->statut;
}
public function setPriorite(?Priorite $priorite): Projet
{
$this->priorite = $priorite;
return $this;
}
public function getPriorite(): ?Priorite
{
return $this->priorite;
}
public function setType(?TypeProjet $type): Projet
{
$this->type = $type;
return $this;
}
public function getType(): ?TypeProjet
{
return $this->type;
}
}