<?php
namespace App\Entity;
use App\Repository\StructureRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=StructureRepository::class)
*/
class Structure
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $nom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "Le nom de la structure ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $adresse;
/**
* @ORM\Column(type="string", length=25, nullable=true)
*/
private $adresseType;
/**
* @ORM\Column(type="string", length=10, nullable=true)
* @Assert\Length(
* min = 5,
* max = 5,
* minMessage = "Le code postal doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le code postal ne doit pas comporter plus de {{ limit }} caractères",
* exactMessage = "Le code postal doit comporter {{ limit }} caractères"
* )
* @Assert\Regex(
* pattern = "/^14|^27|^50|^61|^76/",
* message="Seules les adresses en Normandie sont acceptées !"
* )
*/
private $codePostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $ville;
/**
* @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Length(
* min = 10,
* max = 20,
* minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $telephoneStandard;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Email(
* message = "L'email '{{ value }}' n'est pas un email valide"
* )
*/
private $mailStructure;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $site;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $reseauSocial;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantStatut;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantFonction;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantService;
/**
* @ORM\Column(type="string", length=25, nullable=true)
*/
private $dirigeantCivilite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantNom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantPrenom;
/**
* @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Length(
* min = 10,
* max = 20,
* minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $dirigeantTelephoneFixe;
/**
* @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Length(
* min = 10,
* max = 20,
* minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
* )
*/
private $dirigeantTelephoneMobile;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $dirigeantMail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantAdresse;
/**
* @ORM\Column(type="string", length=10, nullable=true)
* @Assert\Length(
* min = 5,
* max = 5,
* minMessage = "Le code postal doit comporter au moins {{ limit }} caractères",
* maxMessage = "Le code postal ne doit pas comporter plus de {{ limit }} caractères",
* exactMessage = "Le code postal doit comporter {{ limit }} caractères"
* )
*/
private $dirigeantCodePostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $dirigeantVille;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $formeJuridique;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateCreation;
/**
* @ORM\Column(type="string", length=20, nullable=true)
* @Assert\Length(
* max = 20,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $siret;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $codeNaf;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Assert\Regex(
* pattern="/^[\d]*$/",
* message="Seule une valeur positive est autorisée !"
* )
*/
private $nbSalarie;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Assert\Regex(
* pattern="/^[\d]*$/",
* message="Seule une valeur positive est autorisée !"
* )
*/
private $nbCdd;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Assert\Regex(
* pattern="/^[\d]*$/",
* message="Seule une valeur positive est autorisée !"
* )
*/
private $nbJrsIntermittent;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $productionCineAudioCheck;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $productionComCheck;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $prestataireTechniqueCheck;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $prestataireLogistiqueCheck;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="structures")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Contact", mappedBy="structure", cascade={"persist"}, orphanRemoval=true)
*/
private $contacts;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Length(
* max = 255,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $referent;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $modifiedAt;
/**
* @ORM\Column(type="string", length=25)
* @Assert\Length(
* max = 25,
* maxMessage = "{{ limit }} caractères maximum"
* )
*/
private $statut;
/**
* @ORM\Column(type="datetime")
*/
private $statutDate;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $situationPro;
/**
* @ORM\OneToMany(targetEntity="App\Entity\ReseauSocial", mappedBy="structure", cascade={"persist"}, orphanRemoval=true)
*/
private $reseauxSociaux;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $strSelected;
public function __construct()
{
$this->contacts = new ArrayCollection();
$this->reseauxSociaux = new ArrayCollection();
$this->statut = 'nouveau';
$this->statutDate = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getAdresseType(): ?string
{
return $this->adresseType;
}
public function setAdresseType(?string $adresseType): self
{
$this->adresseType = $adresseType;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCodePostal(?string $codePostal): self
{
$this->codePostal = $codePostal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getTelephoneStandard(): ?string
{
return $this->telephoneStandard;
}
public function setTelephoneStandard(string $telephoneStandard): self
{
$this->telephoneStandard = $telephoneStandard;
return $this;
}
public function getMailStructure(): ?string
{
return $this->mailStructure;
}
public function setMailStructure(string $mailStructure): self
{
$this->mailStructure = $mailStructure;
return $this;
}
public function getSite(): ?string
{
return $this->site;
}
public function setSite(?string $site): self
{
$this->site = $site;
return $this;
}
public function getReseauSocial(): ?string
{
return $this->reseauSocial;
}
public function setReseauSocial(?string $reseauSocial): self
{
$this->reseauSocial = $reseauSocial;
return $this;
}
public function getDirigeantStatut(): ?string
{
return $this->dirigeantStatut;
}
public function setDirigeantStatut(?string $dirigeantStatut): self
{
$this->dirigeantStatut = $dirigeantStatut;
return $this;
}
public function getDirigeantFonction(): ?string
{
return $this->dirigeantFonction;
}
public function setDirigeantFonction(?string $dirigeantFonction): self
{
$this->dirigeantFonction = $dirigeantFonction;
return $this;
}
public function getDirigeantService(): ?string
{
return $this->dirigeantService;
}
public function setDirigeantService(?string $dirigeantService): self
{
$this->dirigeantService = $dirigeantService;
return $this;
}
public function getDirigeantCivilite(): ?string
{
return $this->dirigeantCivilite;
}
public function setDirigeantCivilite(?string $dirigeantCivilite): self
{
$this->dirigeantCivilite = $dirigeantCivilite;
return $this;
}
public function getDirigeantNom(): ?string
{
return $this->dirigeantNom;
}
public function setDirigeantNom(?string $dirigeantNom): self
{
$this->dirigeantNom = $dirigeantNom;
return $this;
}
public function getDirigeantPrenom(): ?string
{
return $this->dirigeantPrenom;
}
public function setDirigeantPrenom(?string $dirigeantPrenom): self
{
$this->dirigeantPrenom = $dirigeantPrenom;
return $this;
}
public function getDirigeantTelephoneFixe(): ?string
{
return $this->dirigeantTelephoneFixe;
}
public function setDirigeantTelephoneFixe(?string $dirigeantTelephoneFixe): self
{
$this->dirigeantTelephoneFixe = $dirigeantTelephoneFixe;
return $this;
}
public function getDirigeantTelephoneMobile(): ?string
{
return $this->dirigeantTelephoneMobile;
}
public function setDirigeantTelephoneMobile(?string $dirigeantTelephoneMobile): self
{
$this->dirigeantTelephoneMobile = $dirigeantTelephoneMobile;
return $this;
}
public function getDirigeantMail(): ?string
{
return $this->dirigeantMail;
}
public function setDirigeantMail(?string $dirigeantMail): self
{
$this->dirigeantMail = $dirigeantMail;
return $this;
}
public function getDirigeantAdresse(): ?string
{
return $this->dirigeantAdresse;
}
public function setDirigeantAdresse(?string $dirigeantAdresse): self
{
$this->dirigeantAdresse = $dirigeantAdresse;
return $this;
}
public function getDirigeantCodePostal(): ?string
{
return $this->dirigeantCodePostal;
}
public function setDirigeantCodePostal(?string $dirigeantCodePostal): self
{
$this->dirigeantCodePostal = $dirigeantCodePostal;
return $this;
}
public function getDirigeantVille(): ?string
{
return $this->dirigeantVille;
}
public function setDirigeantVille(?string $dirigeantVille): self
{
$this->dirigeantVille = $dirigeantVille;
return $this;
}
public function getFormeJuridique(): ?string
{
return $this->formeJuridique;
}
public function setFormeJuridique(?string $formeJuridique): self
{
$this->formeJuridique = $formeJuridique;
return $this;
}
public function getDateCreation(): ?\DateTimeInterface
{
return $this->dateCreation;
}
public function setDateCreation(?\DateTimeInterface $dateCreation): self
{
$this->dateCreation = $dateCreation;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setSiret(?string $siret): self
{
$this->siret = $siret;
return $this;
}
public function getCodeNaf(): ?string
{
return $this->codeNaf;
}
public function setCodeNaf(?string $codeNaf): self
{
$this->codeNaf = $codeNaf;
return $this;
}
public function getNbSalarie(): ?int
{
return $this->nbSalarie;
}
public function setNbSalarie(?int $nbSalarie): self
{
$this->nbSalarie = $nbSalarie;
return $this;
}
public function getNbCdd(): ?int
{
return $this->nbCdd;
}
public function setNbCdd(?int $nbCdd): self
{
$this->nbCdd = $nbCdd;
return $this;
}
public function getNbJrsIntermittent(): ?int
{
return $this->nbJrsIntermittent;
}
public function setNbJrsIntermittent(?int $nbJrsIntermittent): self
{
$this->nbJrsIntermittent = $nbJrsIntermittent;
return $this;
}
public function getProductionCineAudioCheck(): ?bool
{
return $this->productionCineAudioCheck;
}
public function setProductionCineAudioCheck(?bool $productionCineAudioCheck): self
{
$this->productionCineAudioCheck = $productionCineAudioCheck;
return $this;
}
public function getProductionComCheck(): ?bool
{
return $this->productionComCheck;
}
public function setProductionComCheck(?bool $productionComCheck): self
{
$this->productionComCheck = $productionComCheck;
return $this;
}
public function getPrestataireTechniqueCheck(): ?bool
{
return $this->prestataireTechniqueCheck;
}
public function setPrestataireTechniqueCheck(?bool $prestataireTechniqueCheck): self
{
$this->prestataireTechniqueCheck = $prestataireTechniqueCheck;
return $this;
}
public function getPrestataireLogistiqueCheck(): ?bool
{
return $this->prestataireLogistiqueCheck;
}
public function setPrestataireLogistiqueCheck(?bool $prestataireLogistiqueCheck): self
{
$this->prestataireLogistiqueCheck = $prestataireLogistiqueCheck;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
/**
* @return Collection|Contact[]
*/
public function getContacts(): Collection
{
return $this->contacts;
}
public function addContact(Contact $contact): self
{
if (!$this->contacts->contains($contact)) {
$this->contacts[] = $contact;
$contact->setStructure($this);
}
return $this;
}
public function removeContact(Contact $contact): self
{
if ($this->contacts->contains($contact)) {
$this->contacts->removeElement($contact);
// set the owning side to null (unless already changed)
if ($contact->getStructure() === $this) {
$contact->setStructure(null);
}
}
return $this;
}
public function getReferent(): ?string
{
return $this->referent;
}
public function setReferent(string $referent): self
{
$this->referent = $referent;
return $this;
}
public function getModifiedAt(): ?\DateTimeInterface
{
return $this->modifiedAt;
}
public function setModifiedAt(\DateTimeInterface $modifiedAt = null): self
{
$this->modifiedAt = $modifiedAt;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getStatutDate(): ?\DateTimeInterface
{
return $this->statutDate;
}
public function setStatutDate(\DateTimeInterface $statutDate): self
{
$this->statutDate = $statutDate;
return $this;
}
public function getSituationPro(): ?string
{
return $this->situationPro;
}
public function setSituationPro(?string $situationPro): self
{
$this->situationPro = $situationPro;
return $this;
}
/**
* @return Collection|ReseauSocial[]
*/
public function getReseauxSociaux(): Collection
{
return $this->reseauxSociaux;
}
public function addReseauxSociaux(ReseauSocial $reseauxSociaux): self
{
if (!$this->reseauxSociaux->contains($reseauxSociaux)) {
$this->reseauxSociaux[] = $reseauxSociaux;
$reseauxSociaux->setStructure($this);
}
return $this;
}
public function removeReseauxSociaux(ReseauSocial $reseauxSociaux): self
{
if ($this->reseauxSociaux->contains($reseauxSociaux)) {
$this->reseauxSociaux->removeElement($reseauxSociaux);
// set the owning side to null (unless already changed)
if ($reseauxSociaux->getStructure() === $this) {
$reseauxSociaux->setStructure(null);
}
}
return $this;
}
public function getStrSelected(): ?bool
{
return $this->strSelected;
}
public function setStrSelected(?bool $strSelected): self
{
$this->strSelected = $strSelected;
return $this;
}
}