src/Entity/Entreprise.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\User;
  4. use App\Entity\InformationCF;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use App\Repository\EntrepriseRepository;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. #[ORM\Entity(repositoryClassEntrepriseRepository::class)]
  12. class Entreprise extends User
  13. {
  14.     public const STATUT_PUBLIQUE 'Publique';
  15.     public const STATUT_PRIVEE 'Privée';
  16.     public const EXPORTATRICE_TOTALEMENT 'Totalement';
  17.     public const EXPORTATRICE_PARTIELLEMENT 'Partiellement ';
  18.     public const EXPORTATRICE_NON 'Non';
  19.     public const OFF_SHORE_OUI 'Oui';
  20.     public const OFF_SHORE_NON 'Non';
  21.     public const TAUX_TFP_0 '0%';
  22.     public const TAUX_TFP_1  '1%';
  23.     public const TAUX_TFP_2  '2%';
  24.     //regime_travail
  25.     public const REGIME_TRAVAIL_48  '48h';
  26.     public const REGIME_TRAVAIL_40  '40h';
  27.     #[ORM\Column(type'string'length255)]
  28.     #[Assert\Regex(
  29.         pattern'^[0-9]{7}[A-Za-z]{3}[0-9]{3}$^'
  30.         message'7 chiffres 3 lettres 3 chiffres',
  31.         )]
  32.     private $matricule_fiscal;
  33.     #[ORM\Column(type'string'length255)]
  34.     private $nom_commercial;
  35.     #[ORM\Column(type'string'length255)]
  36.     private $fax;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private $code_cnss;
  39.     #[ORM\Column(type'string'length255 nullable:true)]
  40.     private $cnsscnrps null;
  41.     #[ORM\Column(type'string'length255)]
  42.     private $secteur;
  43.     #[ORM\Column(type'string'length255)]
  44.     private $branche;
  45.     #[ORM\Column(type'string'length255)]
  46.     private $Produits_services_rendus;
  47.     #[ORM\Column(type'string'length255)]
  48.     private $statut;
  49.     #[ORM\Column(type'string'length255)]
  50.     private $exportatrice;
  51.     #[ORM\Column(type'string'length255)]
  52.     private $off_shore;
  53.     #[ORM\Column(type'string'length255)]
  54.     private $taux_TFP;
  55.     #[ORM\Column(type'string'length255)]
  56.     private $regime_travail;
  57.     #[ORM\Column(type'string'length255)]
  58.     private $tel;
  59.     #[ORM\Column(type'string'length255)]
  60.     private $nom_prenom_premier_responsable;
  61.     #[ORM\Column(type'string'length255)]
  62.     private $Raison_sociale;
  63.     #[ORM\OneToMany(mappedBy'entreprise'targetEntityChargeFormation::class, cascade: ['persist''remove'])]
  64.     private $charge_formations;
  65.     #[ORM\Column(type'decimal'precision10scale3nullabletrue)]
  66.     private ?float $montant null;
  67.     #[ORM\Column(length255)]
  68.     private ?string $adresseSiegeSocial null;
  69.     #[ORM\Column(length255)]
  70.     private ?string $adresseSiteProduction  null;
  71.     #[ORM\ManyToOne()]
  72.     private ?Gouvernorat $gouvernorat null;
  73.     #[ORM\OneToOne()]
  74.     private ?Delegation $delegation null;
  75.     #[ORM\OneToMany(mappedBy'entreprise'targetEntityRapportEvaluation::class)]
  76.     private Collection $rapportEvaluations;
  77.     public function __construct()
  78.     {
  79.         parent::__construct();
  80.         $this->charge_formations = new ArrayCollection();
  81.         $this->rapportEvaluations = new ArrayCollection();
  82.     }
  83.     public function getMatriculeFiscal(): ?string
  84.     {
  85.         return $this->matricule_fiscal;
  86.     }
  87.     public function setMatriculeFiscal(string $matricule_fiscal): self
  88.     {
  89.         $this->matricule_fiscal $matricule_fiscal;
  90.         return $this;
  91.     }
  92.     public function getNomCommercial(): ?string
  93.     {
  94.         return $this->nom_commercial;
  95.     }
  96.     public function setNomCommercial(string $nom_commercial): self
  97.     {
  98.         $this->nom_commercial $nom_commercial;
  99.         return $this;
  100.     }
  101.     public function getFax(): ?string
  102.     {
  103.         return $this->fax;
  104.     }
  105.     public function setFax(string $fax): self
  106.     {
  107.         $this->fax $fax;
  108.         return $this;
  109.     }
  110.     public function getCodeCnss(): ?string
  111.     {
  112.         return $this->code_cnss;
  113.     }
  114.     public function setCodeCnss(string $code_cnss): self
  115.     {
  116.         $this->code_cnss $code_cnss;
  117.         return $this;
  118.     }
  119.     public function getSecteur(): ?string
  120.     {
  121.         return $this->secteur;
  122.     }
  123.     public function setSecteur(string $secteur): self
  124.     {
  125.         $this->secteur $secteur;
  126.         return $this;
  127.     }
  128.     public function getBranche(): ?string
  129.     {
  130.         return $this->branche;
  131.     }
  132.     public function setBranche(string $branche): self
  133.     {
  134.         $this->branche $branche;
  135.         return $this;
  136.     }
  137.     public function getProduitsServicesRendus(): ?string
  138.     {
  139.         return $this->Produits_services_rendus;
  140.     }
  141.     public function setProduitsServicesRendus(string $Produits_services_rendus): self
  142.     {
  143.         $this->Produits_services_rendus $Produits_services_rendus;
  144.         return $this;
  145.     }
  146.     public function getStatut(): ?string
  147.     {
  148.         return $this->statut;
  149.     }
  150.     public function setStatut(string $statut): self
  151.     {
  152.         $this->statut $statut;
  153.         return $this;
  154.     }
  155.     public function getExportatrice(): ?string
  156.     {
  157.         return $this->exportatrice;
  158.     }
  159.     public function setExportatrice(string $exportatrice): self
  160.     {
  161.         $this->exportatrice $exportatrice;
  162.         return $this;
  163.     }
  164.     public function getOffShore(): ?string
  165.     {
  166.         return $this->off_shore;
  167.     }
  168.     public function setOffShore(string $off_shore): self
  169.     {
  170.         $this->off_shore $off_shore;
  171.         return $this;
  172.     }
  173.     public function getTauxTFP(): ?string
  174.     {
  175.         return $this->taux_TFP;
  176.     }
  177.     public function setTauxTFP(string $taux_TFP): self
  178.     {
  179.         $this->taux_TFP $taux_TFP;
  180.         return $this;
  181.     }
  182.     public function getRegimeTravail(): ?string
  183.     {
  184.         return $this->regime_travail;
  185.     }
  186.     public function setRegimeTravail(string $regime_travail): self
  187.     {
  188.         $this->regime_travail $regime_travail;
  189.         return $this;
  190.     }
  191.     public function getTel(): ?string
  192.     {
  193.         return $this->tel;
  194.     }
  195.     public function setTel(string $tel): self
  196.     {
  197.         $this->tel $tel;
  198.         return $this;
  199.     }
  200.     public function getNomPrenomPremierResponsable(): ?string
  201.     {
  202.         return $this->nom_prenom_premier_responsable;
  203.     }
  204.     public function setNomPrenomPremierResponsable(string $nom_prenom_premier_responsable): self
  205.     {
  206.         $this->nom_prenom_premier_responsable $nom_prenom_premier_responsable;
  207.         return $this;
  208.     }
  209.     public function getRaisonSociale(): ?string
  210.     {
  211.         return $this->Raison_sociale;
  212.     }
  213.     public function setRaisonSociale(string $Raison_sociale): self
  214.     {
  215.         $this->Raison_sociale $Raison_sociale;
  216.         return $this;
  217.     }
  218.     public function getMontant(): ?string
  219.     {
  220.         return $this->montant;
  221.     }
  222.     public function setMontant(?string $montant): self
  223.     {
  224.         $this->montant $montant;
  225.         return $this;
  226.     }
  227.     public function getAdresseSiegeSocial(): ?string
  228.     {
  229.         return $this->adresseSiegeSocial;
  230.     }
  231.     public function setAdresseSiegeSocial(string $adresseSiegeSocial): self
  232.     {
  233.         $this->adresseSiegeSocial $adresseSiegeSocial;
  234.         return $this;
  235.     }
  236.     public function getAdresseSiteProduction(): ?string
  237.     {
  238.         return $this->adresseSiteProduction;
  239.     }
  240.     public function setAdresseSiteProduction(string $adresseSiteProduction): self
  241.     {
  242.         $this->adresseSiteProduction $adresseSiteProduction;
  243.         return $this;
  244.     }
  245.     /**
  246.      * @return Collection<int, ChargeFormation>
  247.      */
  248.     public function getChargeFormations(): Collection
  249.     {
  250.         return $this->charge_formations;
  251.     }
  252.     public function addChargeFormation(ChargeFormation $chargeFormation): self
  253.     {
  254.         if (!$this->charge_formations->contains($chargeFormation)) {
  255.             $this->charge_formations->add($chargeFormation);
  256.             $chargeFormation->setEntreprise($this);
  257.         }
  258.         return $this;
  259.     }
  260.     public function removeChargeFormation(ChargeFormation $chargeFormation): self
  261.     {
  262.         if ($this->charge_formations->removeElement($chargeFormation)) {
  263.             // set the owning side to null (unless already changed)
  264.             if ($chargeFormation->getEntreprise() === $this) {
  265.                 $chargeFormation->setEntreprise(null);
  266.             }
  267.         }
  268.         return $this;
  269.     }
  270.     public function getGouvernorat(): ?Gouvernorat
  271.     {
  272.         return $this->gouvernorat;
  273.     }
  274.     public function setGouvernorat(?Gouvernorat $gouvernorat): self
  275.     {
  276.         $this->gouvernorat $gouvernorat;
  277.         return $this;
  278.     }
  279.     public function getDelegation(): ?Delegation
  280.     {
  281.         return $this->delegation;
  282.     }
  283.     public function setDelegation(?Delegation $delegation): self
  284.     {
  285.         $this->delegation $delegation;
  286.         return $this;
  287.     }
  288.     /**
  289.      * Get the value of cnsscnrps
  290.      */ 
  291.     public function getCnsscnrps()
  292.     {
  293.         return $this->cnsscnrps;
  294.     }
  295.     /**
  296.      * Set the value of cnsscnrps
  297.      *
  298.      * @return  self
  299.      */ 
  300.     public function setCnsscnrps($cnsscnrps)
  301.     {
  302.         $this->cnsscnrps $cnsscnrps;
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return Collection<int, RapportEvaluation>
  307.      */
  308.     public function getRapportEvaluations(): Collection
  309.     {
  310.         return $this->rapportEvaluations;
  311.     }
  312.     public function addRapportEvaluation(RapportEvaluation $rapportEvaluation): self
  313.     {
  314.         if (!$this->rapportEvaluations->contains($rapportEvaluation)) {
  315.             $this->rapportEvaluations->add($rapportEvaluation);
  316.             $rapportEvaluation->setEntreprise($this);
  317.         }
  318.         return $this;
  319.     }
  320.     public function removeRapportEvaluation(RapportEvaluation $rapportEvaluation): self
  321.     {
  322.         if ($this->rapportEvaluations->removeElement($rapportEvaluation)) {
  323.             // set the owning side to null (unless already changed)
  324.             if ($rapportEvaluation->getEntreprise() === $this) {
  325.                 $rapportEvaluation->setEntreprise(null);
  326.             }
  327.         }
  328.         return $this;
  329.     }
  330.     public function __toString()
  331.     {
  332.         return (string) $this->Raison_sociale;
  333.     }
  334. }