<?php
namespace App\Entity\Kanban;
use App\Entity\Clients\Client;
use App\Entity\Fournisseurs\Fournisseur;
use App\Entity\Notes\Note;
use App\Entity\Projets\ProjetActivite;
use App\Entity\Projets\ProjetDomaine;
use App\Entity\Projets\ProjetUtilisateur;
use App\Entity\Utilisateur\Contact;
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 App\Annotations\SecuredEntity;
/**
* Fiche
*
* @ORM\Table("kanban__fiche")
* @ORM\Entity(repositoryClass="App\Repository\Kanban\FicheRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Fiche", group="TACHES")
*/
class Fiche
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Notes\Note", mappedBy="fiche")
*/
private $notes;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Kanban\FicheOrigine", cascade={"persist"}, mappedBy="fiche"))
*/
private $ficheOrigine;
/**
* @var boolean
* @ORM\Column(name="fiable", type="boolean", nullable=true)
*/
protected $probabiliteRentreParUtilisateur;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Kanban\Favoris", mappedBy="fiche")
*/
private $favoris;
/**
* @ORM\Column(name="reference", type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Libellé obligatoire.")
*/
private $libelle;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="date_mail_80", type="datetime", nullable=true)
*/
private $dateMail80;
/**
* @ORM\Column(name="date_mail_100", type="datetime", nullable=true)
*/
private $dateMail100;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="datePrevisionelle", type="datetime", nullable=true)
*/
private $datePrevisionelle;
/**
* @ORM\Column(name="budget", type="float", nullable=true)
*/
private $budget;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateurGagnePerdu;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Region", inversedBy="fiche")
* @ORM\JoinColumn(nullable=true)
*/
private $region;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Concurrent")
* @ORM\JoinColumn(nullable=true)
*/
private $concurrent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Clients\Client")
* @ORM\JoinColumn(nullable=true)
*/
private $client;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
* @ORM\JoinColumn(nullable=true)
*/
private $contact;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Colonne", inversedBy="fiches")
* @ORM\JoinColumn(nullable=true)
* @Assert\NotBlank(message="Phase obligatoire")
*/
private $colonne;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\TypeContrat")
* @ORM\JoinColumn(nullable=true)
*/
private $typeContrat;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Kanban")
* @ORM\JoinColumn(nullable=true)
* @Assert\NotBlank(message="Tunnel obligatoire")
*/
private $kanban;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\StatutFiche")
* @ORM\JoinColumn(nullable=true)
*/
private $statutFiche;
/**
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Kanban\Document", cascade={"persist"},mappedBy="fiche")
*/
private $documents;
/**
* @ORM\Column(name="dateDevisTechnique", type="datetime", nullable=true)
*/
private $dateDevisTechnique;
/**
* @ORM\Column(name="reference_divalto", type="string", length=255, nullable=true)
*/
private $referenceDivalto;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Kanban\Equipe", cascade={"persist"}, mappedBy="fiche")
*/
private $equipe;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Kanban\FicheContact", cascade={"persist"}, mappedBy="fiche")
*/
private $ficheContact;
/**
* @ORM\Column(name="potentiel", type="integer", nullable=true)
*/
private $potentiel;
/**
* @ORM\Column(name="propabilite", type="integer", nullable=true)
*/
private $propabilite;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Kanban\Raison")
* @ORM\JoinColumn(nullable=true)
*/
private $raison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Contact")
* @ORM\JoinColumn(nullable=true)
*/
private $apporteur;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $chefProjet;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur")
* @ORM\JoinColumn(nullable=true)
*/
private $commercial;
/**
* @ORM\Column(name="id_import", type="string", length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetDomaine", mappedBy="fiche")
*/
private $projetDomaines;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetActivite", mappedBy="fiche")
*/
private $projetActivites;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Projets\ProjetUtilisateur", mappedBy="fiche")
*/
private $projetUtilisateurs;
/**
* @ORM\Column(name="date_livraison_souhaitee", type="datetime", nullable=true)
*/
private $dateLivraisonSouhaitee;
/**
* @ORM\Column(name="date_echeance", type="datetime", nullable=true)
*/
private $dateEcheance;
/**
* @ORM\Column(name="numero_fiche", type="integer", nullable=true)
*/
private $numeroFiche;
/**
* @ORM\Column(name="archive", type="boolean", nullable=true)
*/
private $archive;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Fournisseurs\Fournisseur")
* @ORM\JoinColumn(nullable=true)
*/
private $mandataire;
public function __toString()
{
return $this->libelle;
}
public function __construct()
{
$this->date = new Datetime();
$this->projetUtilisateurs = new ArrayCollection();
$this->projetActivites = new ArrayCollection();
$this->projetDomaines = new ArrayCollection();
$this->ficheOrigine = new ArrayCollection();
$this->notes = new ArrayCollection();
$this->ficheContact = new ArrayCollection();
$this->equipe = new ArrayCollection();
$this->favoris = new ArrayCollection();
$this->documents = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): Fiche
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDate(?DateTime $date): Fiche
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Fiche
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDatePrevisionelle(?DateTime $datePrevisionelle): Fiche
{
$this->datePrevisionelle = $datePrevisionelle;
return $this;
}
public function getDatePrevisionelle(): ?DateTime
{
return $this->datePrevisionelle;
}
public function setBudget(?float $budget): Fiche
{
$this->budget = $budget;
return $this;
}
public function getBudget(): ?float
{
return $this->budget;
}
public function setColonne(?Colonne $colonne): Fiche
{
$this->colonne = $colonne;
return $this;
}
public function getColonne(): ?Colonne
{
return $this->colonne;
}
public function setStatutFiche(?StatutFiche $statutFiche): Fiche
{
$this->statutFiche = $statutFiche;
return $this;
}
public function getStatutFiche(): ?StatutFiche
{
return $this->statutFiche;
}
public function setUtilisateur(?Utilisateur $utilisateur): Fiche
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setClient(?Client $client): Fiche
{
$this->client = $client;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setDescription(?string $description): Fiche
{
$this->description = $description;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function addDocument(Document $document): Fiche
{
$this->documents[] = $document;
return $this;
}
public function removeDocument(Document $document)
{
$this->documents->removeElement($document);
}
public function getDocuments(): Collection
{
return $this->documents;
}
public function setReference(?string $reference): Fiche
{
$this->reference = $reference;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function addFavori(Favoris $favori): Fiche
{
$this->favoris[] = $favori;
return $this;
}
public function removeFavori(Favoris $favori)
{
$this->favoris->removeElement($favori);
}
public function getFavoris(): Collection
{
return $this->favoris;
}
public function setContact(?Contact $contact): Fiche
{
$this->contact = $contact;
return $this;
}
public function getContact(): ?Contact
{
return $this->contact;
}
public function setDateDevisTechnique(?DateTime $dateDevisTechnique): Fiche
{
$this->dateDevisTechnique = $dateDevisTechnique;
return $this;
}
public function getDateDevisTechnique(): ?DateTime
{
return $this->dateDevisTechnique;
}
public function setReferenceDivalto(?string $referenceDivalto): Fiche
{
$this->referenceDivalto = $referenceDivalto;
return $this;
}
public function getReferenceDivalto(): ?string
{
return $this->referenceDivalto;
}
public function addEquipe(Equipe $equipe): Fiche
{
$this->equipe[] = $equipe;
return $this;
}
public function removeEquipe(Equipe $equipe)
{
$this->equipe->removeElement($equipe);
}
public function getEquipe(): Collection
{
return $this->equipe;
}
public function setDateMail80(?DateTime $dateMail80): Fiche
{
$this->dateMail80 = $dateMail80;
return $this;
}
public function getDateMail80(): ?DateTime
{
return $this->dateMail80;
}
public function setDateMail100(?DateTime $dateMail100): Fiche
{
$this->dateMail100 = $dateMail100;
return $this;
}
public function getDateMail100(): ?DateTime
{
return $this->dateMail100;
}
public function setPotentiel(?int $potentiel): Fiche
{
$this->potentiel = $potentiel;
return $this;
}
public function getPotentiel(): ?int
{
return $this->potentiel;
}
public function setRegion(?Region $region): Fiche
{
$this->region = $region;
return $this;
}
public function getRegion(): ?Region
{
return $this->region;
}
public function setConcurrent(?Concurrent $concurrent): Fiche
{
$this->concurrent = $concurrent;
return $this;
}
public function getConcurrent(): ?Concurrent
{
return $this->concurrent;
}
public function setKanban(?Kanban $kanban): Fiche
{
$this->kanban = $kanban;
return $this;
}
public function getKanban(): ?Kanban
{
return $this->kanban;
}
public function setUtilisateurGagnePerdu(?Utilisateur $utilisateurGagnePerdu): Fiche
{
$this->utilisateurGagnePerdu = $utilisateurGagnePerdu;
return $this;
}
public function getUtilisateurGagnePerdu(): ?Utilisateur
{
return $this->utilisateurGagnePerdu;
}
public function addFicheContact(FicheContact $ficheContact): Fiche
{
$this->ficheContact[] = $ficheContact;
return $this;
}
public function removeFicheContact(FicheContact $ficheContact)
{
$this->ficheContact->removeElement($ficheContact);
}
public function getFicheContact(): Collection
{
return $this->ficheContact;
}
public function setPropabilite(?int $propabilite): Fiche
{
$this->propabilite = $propabilite;
return $this;
}
public function getPropabilite(): ?int
{
return $this->propabilite;
}
public function setProbabiliteRentreParUtilisateur(?bool $probabiliteRentreParUtilisateur): Fiche
{
$this->probabiliteRentreParUtilisateur = $probabiliteRentreParUtilisateur;
return $this;
}
public function getProbabiliteRentreParUtilisateur(): ?bool
{
return $this->probabiliteRentreParUtilisateur;
}
public function setRaison(?Raison $raison): Fiche
{
$this->raison = $raison;
return $this;
}
public function getRaison(): ?Raison
{
return $this->raison;
}
public function addNote(Note $note): Fiche
{
$this->notes[] = $note;
return $this;
}
public function removeNote(Note $note)
{
$this->notes->removeElement($note);
}
public function getNotes(): Collection
{
return $this->notes;
}
public function setTypeContrat(?TypeContrat $typeContrat): Fiche
{
$this->typeContrat = $typeContrat;
return $this;
}
public function getTypeContrat(): ?TypeContrat
{
return $this->typeContrat;
}
public function addFicheOrigine(FicheOrigine $ficheOrigine): Fiche
{
$this->ficheOrigine[] = $ficheOrigine;
return $this;
}
public function removeFicheOrigine(FicheOrigine $ficheOrigine)
{
$this->ficheOrigine->removeElement($ficheOrigine);
}
public function getFicheOrigine(): Collection
{
return $this->ficheOrigine;
}
public function setChefProjet(?Utilisateur $chefProjet): Fiche
{
$this->chefProjet = $chefProjet;
return $this;
}
public function getChefProjet(): ?Utilisateur
{
return $this->chefProjet;
}
public function setCommercial(?Utilisateur $commercial): Fiche
{
$this->commercial = $commercial;
return $this;
}
public function getCommercial(): ?Utilisateur
{
return $this->commercial;
}
public function setIdImport(?string $idImport): Fiche
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function addProjetDomaine(ProjetDomaine $projetDomaine): Fiche
{
$this->projetDomaines[] = $projetDomaine;
return $this;
}
public function removeProjetDomaine(ProjetDomaine $projetDomaine)
{
$this->projetDomaines->removeElement($projetDomaine);
}
public function getProjetDomaines(): Collection
{
return $this->projetDomaines;
}
public function addProjetActivite(ProjetActivite $projetActivite): Fiche
{
$this->projetActivites[] = $projetActivite;
return $this;
}
public function removeProjetActivite(ProjetActivite $projetActivite)
{
$this->projetActivites->removeElement($projetActivite);
}
public function getProjetActivites(): Collection
{
return $this->projetActivites;
}
public function setApporteur(?Contact $apporteur): Fiche
{
$this->apporteur = $apporteur;
return $this;
}
public function getApporteur(): ?Contact
{
return $this->apporteur;
}
public function setDateLivraisonSouhaitee(?DateTime $dateLivraisonSouhaitee): Fiche
{
$this->dateLivraisonSouhaitee = $dateLivraisonSouhaitee;
return $this;
}
public function getDateLivraisonSouhaitee(): ?DateTime
{
return $this->dateLivraisonSouhaitee;
}
public function setDateEcheance(?DateTime $dateEcheance): Fiche
{
$this->dateEcheance = $dateEcheance;
return $this;
}
public function getDateEcheance(): ?DateTime
{
return $this->dateEcheance;
}
public function addProjetUtilisateur(ProjetUtilisateur $projetUtilisateur): Fiche
{
$this->projetUtilisateurs[] = $projetUtilisateur;
return $this;
}
public function removeProjetUtilisateur(ProjetUtilisateur $projetUtilisateur)
{
$this->projetUtilisateurs->removeElement($projetUtilisateur);
}
public function getProjetUtilisateurs(): Collection
{
return $this->projetUtilisateurs;
}
public function setNumeroFiche(?int $numeroFiche): Fiche
{
$this->numeroFiche = $numeroFiche;
return $this;
}
public function getNumeroFiche(): ?int
{
return $this->numeroFiche;
}
public function setArchive(?bool $archive): Fiche
{
$this->archive = $archive;
return $this;
}
public function getArchive(): ?bool
{
return $this->archive;
}
public function setMandataire(?Fournisseur $mandataire): Fiche
{
$this->mandataire = $mandataire;
return $this;
}
public function getMandataire(): ?Fournisseur
{
return $this->mandataire;
}
}