<?php
namespace App\Entity;
use App\Entity\User;
use App\Entity\InformationCF;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\EntrepriseRepository;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: EntrepriseRepository::class)]
class Entreprise extends User
{
public const STATUT_PUBLIQUE = 'Publique';
public const STATUT_PRIVEE = 'Privée';
public const EXPORTATRICE_TOTALEMENT = 'Totalement';
public const EXPORTATRICE_PARTIELLEMENT = 'Partiellement ';
public const EXPORTATRICE_NON = 'Non';
public const OFF_SHORE_OUI = 'Oui';
public const OFF_SHORE_NON = 'Non';
public const TAUX_TFP_0 = '0%';
public const TAUX_TFP_1 = '1%';
public const TAUX_TFP_2 = '2%';
//regime_travail
public const REGIME_TRAVAIL_48 = '48h';
public const REGIME_TRAVAIL_40 = '40h';
#[ORM\Column(type: 'string', length: 255)]
#[Assert\Regex(
pattern: '^[0-9]{7}[A-Za-z]{3}[0-9]{3}$^',
message: '7 chiffres 3 lettres 3 chiffres',
)]
private $matricule_fiscal;
#[ORM\Column(type: 'string', length: 255)]
private $nom_commercial;
#[ORM\Column(type: 'string', length: 255)]
private $fax;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $code_cnss;
#[ORM\Column(type: 'string', length: 255 , nullable:true)]
private $cnsscnrps = null;
#[ORM\Column(type: 'string', length: 255)]
private $secteur;
#[ORM\Column(type: 'string', length: 255)]
private $branche;
#[ORM\Column(type: 'string', length: 255)]
private $Produits_services_rendus;
#[ORM\Column(type: 'string', length: 255)]
private $statut;
#[ORM\Column(type: 'string', length: 255)]
private $exportatrice;
#[ORM\Column(type: 'string', length: 255)]
private $off_shore;
#[ORM\Column(type: 'string', length: 255)]
private $taux_TFP;
#[ORM\Column(type: 'string', length: 255)]
private $regime_travail;
#[ORM\Column(type: 'string', length: 255)]
private $tel;
#[ORM\Column(type: 'string', length: 255)]
private $nom_prenom_premier_responsable;
#[ORM\Column(type: 'string', length: 255)]
private $Raison_sociale;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: ChargeFormation::class, cascade: ['persist', 'remove'])]
private $charge_formations;
#[ORM\Column(type: 'decimal', precision: 10, scale: 3, nullable: true)]
private ?float $montant = null;
#[ORM\Column(length: 255)]
private ?string $adresseSiegeSocial = null;
#[ORM\Column(length: 255)]
private ?string $adresseSiteProduction = null;
#[ORM\ManyToOne()]
private ?Gouvernorat $gouvernorat = null;
#[ORM\OneToOne()]
private ?Delegation $delegation = null;
#[ORM\OneToMany(mappedBy: 'entreprise', targetEntity: RapportEvaluation::class)]
private Collection $rapportEvaluations;
public function __construct()
{
parent::__construct();
$this->charge_formations = new ArrayCollection();
$this->rapportEvaluations = new ArrayCollection();
}
public function getMatriculeFiscal(): ?string
{
return $this->matricule_fiscal;
}
public function setMatriculeFiscal(string $matricule_fiscal): self
{
$this->matricule_fiscal = $matricule_fiscal;
return $this;
}
public function getNomCommercial(): ?string
{
return $this->nom_commercial;
}
public function setNomCommercial(string $nom_commercial): self
{
$this->nom_commercial = $nom_commercial;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setFax(string $fax): self
{
$this->fax = $fax;
return $this;
}
public function getCodeCnss(): ?string
{
return $this->code_cnss;
}
public function setCodeCnss(string $code_cnss): self
{
$this->code_cnss = $code_cnss;
return $this;
}
public function getSecteur(): ?string
{
return $this->secteur;
}
public function setSecteur(string $secteur): self
{
$this->secteur = $secteur;
return $this;
}
public function getBranche(): ?string
{
return $this->branche;
}
public function setBranche(string $branche): self
{
$this->branche = $branche;
return $this;
}
public function getProduitsServicesRendus(): ?string
{
return $this->Produits_services_rendus;
}
public function setProduitsServicesRendus(string $Produits_services_rendus): self
{
$this->Produits_services_rendus = $Produits_services_rendus;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getExportatrice(): ?string
{
return $this->exportatrice;
}
public function setExportatrice(string $exportatrice): self
{
$this->exportatrice = $exportatrice;
return $this;
}
public function getOffShore(): ?string
{
return $this->off_shore;
}
public function setOffShore(string $off_shore): self
{
$this->off_shore = $off_shore;
return $this;
}
public function getTauxTFP(): ?string
{
return $this->taux_TFP;
}
public function setTauxTFP(string $taux_TFP): self
{
$this->taux_TFP = $taux_TFP;
return $this;
}
public function getRegimeTravail(): ?string
{
return $this->regime_travail;
}
public function setRegimeTravail(string $regime_travail): self
{
$this->regime_travail = $regime_travail;
return $this;
}
public function getTel(): ?string
{
return $this->tel;
}
public function setTel(string $tel): self
{
$this->tel = $tel;
return $this;
}
public function getNomPrenomPremierResponsable(): ?string
{
return $this->nom_prenom_premier_responsable;
}
public function setNomPrenomPremierResponsable(string $nom_prenom_premier_responsable): self
{
$this->nom_prenom_premier_responsable = $nom_prenom_premier_responsable;
return $this;
}
public function getRaisonSociale(): ?string
{
return $this->Raison_sociale;
}
public function setRaisonSociale(string $Raison_sociale): self
{
$this->Raison_sociale = $Raison_sociale;
return $this;
}
public function getMontant(): ?string
{
return $this->montant;
}
public function setMontant(?string $montant): self
{
$this->montant = $montant;
return $this;
}
public function getAdresseSiegeSocial(): ?string
{
return $this->adresseSiegeSocial;
}
public function setAdresseSiegeSocial(string $adresseSiegeSocial): self
{
$this->adresseSiegeSocial = $adresseSiegeSocial;
return $this;
}
public function getAdresseSiteProduction(): ?string
{
return $this->adresseSiteProduction;
}
public function setAdresseSiteProduction(string $adresseSiteProduction): self
{
$this->adresseSiteProduction = $adresseSiteProduction;
return $this;
}
/**
* @return Collection<int, ChargeFormation>
*/
public function getChargeFormations(): Collection
{
return $this->charge_formations;
}
public function addChargeFormation(ChargeFormation $chargeFormation): self
{
if (!$this->charge_formations->contains($chargeFormation)) {
$this->charge_formations->add($chargeFormation);
$chargeFormation->setEntreprise($this);
}
return $this;
}
public function removeChargeFormation(ChargeFormation $chargeFormation): self
{
if ($this->charge_formations->removeElement($chargeFormation)) {
// set the owning side to null (unless already changed)
if ($chargeFormation->getEntreprise() === $this) {
$chargeFormation->setEntreprise(null);
}
}
return $this;
}
public function getGouvernorat(): ?Gouvernorat
{
return $this->gouvernorat;
}
public function setGouvernorat(?Gouvernorat $gouvernorat): self
{
$this->gouvernorat = $gouvernorat;
return $this;
}
public function getDelegation(): ?Delegation
{
return $this->delegation;
}
public function setDelegation(?Delegation $delegation): self
{
$this->delegation = $delegation;
return $this;
}
/**
* Get the value of cnsscnrps
*/
public function getCnsscnrps()
{
return $this->cnsscnrps;
}
/**
* Set the value of cnsscnrps
*
* @return self
*/
public function setCnsscnrps($cnsscnrps)
{
$this->cnsscnrps = $cnsscnrps;
return $this;
}
/**
* @return Collection<int, RapportEvaluation>
*/
public function getRapportEvaluations(): Collection
{
return $this->rapportEvaluations;
}
public function addRapportEvaluation(RapportEvaluation $rapportEvaluation): self
{
if (!$this->rapportEvaluations->contains($rapportEvaluation)) {
$this->rapportEvaluations->add($rapportEvaluation);
$rapportEvaluation->setEntreprise($this);
}
return $this;
}
public function removeRapportEvaluation(RapportEvaluation $rapportEvaluation): self
{
if ($this->rapportEvaluations->removeElement($rapportEvaluation)) {
// set the owning side to null (unless already changed)
if ($rapportEvaluation->getEntreprise() === $this) {
$rapportEvaluation->setEntreprise(null);
}
}
return $this;
}
public function __toString()
{
return (string) $this->Raison_sociale;
}
}