src/Entity/Client.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClientRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Entity(repositoryClass=ClientRepository::class)
  10.  */
  11. class Client
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $name;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $logo;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $rgpdFile;
  31.     /**
  32.      * @ORM\Column(type="text")
  33.      */
  34.     private $description;
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $baseline;
  39.     /**
  40.      * @ORM\Column(type="string", length=255)
  41.      */
  42.     private $background;
  43.     /**
  44.      * @ORM\Column(type="string", length=255)
  45.      * @ORM\JoinColumn(nullable=false)
  46.      */
  47.     private $altLogo;
  48.     /**
  49.      * @ORM\Column(type="boolean")
  50.      */
  51.     private $isActive;
  52.     /**
  53.      * @ORM\Column(type="datetime")
  54.      */
  55.     private $createdAt;
  56.     /**
  57.      * @ORM\Column(type="datetime")
  58.      */
  59.     private $modifiedAt;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, unique=true)
  62.      * @Gedmo\Slug(fields={"name"})
  63.      */
  64.     private $slug;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity=ClientProduct::class, mappedBy="client")
  67.      */
  68.     private $clientProducts;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity=Location::class, mappedBy="client")
  71.      */
  72.     private $locations;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity=SubLocation::class, mappedBy="client")
  75.      */
  76.     private $subLocations;
  77.     /**
  78.      * @ORM\OneToMany(targetEntity=Domain::class, mappedBy="client")
  79.      */
  80.     private $domains;
  81.     /**
  82.      * @ORM\Column(type="string", length=255)
  83.      */
  84.     private $salt;
  85.     /**
  86.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="client")
  87.      */
  88.     private $users;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity=Job::class, mappedBy="client")
  91.      */
  92.     private $jobs;
  93.     /**
  94.      * @ORM\OneToMany(targetEntity=Contact::class, mappedBy="client")
  95.      */
  96.     private $contacts;
  97.     /**
  98.      * @ORM\Column(type="string", length=255)
  99.      */
  100.     private $mainColor;
  101.     /**
  102.      * @ORM\Column(type="string", length=255)
  103.      */
  104.     private $secondaryColor;
  105.     /**
  106.      * @ORM\Column(type="boolean")
  107.      */
  108.     private $isSecure;
  109.     /**
  110.      * @ORM\Column(type="boolean")
  111.      */
  112.     private $isHiddenJobTitle;
  113.     /**
  114.      * @ORM\Column(type="boolean")
  115.      */
  116.     private $isHiddenUserJob;
  117.     /**
  118.      * @ORM\Column(type="string", length=255)
  119.      */
  120.     private $labelLocation;
  121.     /**
  122.      * @ORM\Column(type="string", length=255)
  123.      */
  124.     private $labelSubLocation;
  125.     /**
  126.      * @ORM\Column(type="boolean")
  127.      */
  128.     private $hasMicrosoft;
  129.     /**
  130.      * @ORM\Column(type="boolean")
  131.      */
  132.     private $hasZoom;
  133.     public function __construct()
  134.     {
  135.         $this->clientProducts = new ArrayCollection();
  136.         $this->locations = new ArrayCollection();
  137.         $this->subLocations = new ArrayCollection();
  138.         $this->domains = new ArrayCollection();
  139.         $this->users = new ArrayCollection();
  140.         $this->jobs = new ArrayCollection();
  141.         $this->contacts = new ArrayCollection();
  142.     }
  143.     public function getSlug(): ?string
  144.     {
  145.         return $this->slug;
  146.     }
  147.     public function setSlug(string $slug): self
  148.     {
  149.         $this->slug $slug;
  150.         return $this;
  151.     }
  152.     public function getId(): ?int
  153.     {
  154.         return $this->id;
  155.     }
  156.     public function getName(): ?string
  157.     {
  158.         return $this->name;
  159.     }
  160.     public function setName(string $name): self
  161.     {
  162.         $this->name $name;
  163.         return $this;
  164.     }
  165.     public function getLogo(): ?string
  166.     {
  167.         return $this->logo;
  168.     }
  169.     public function setLogo(string $logo): self
  170.     {
  171.         $this->logo $logo;
  172.         return $this;
  173.     }
  174.     public function getRgpdFile(): ?string
  175.     {
  176.         return $this->rgpdFile;
  177.     }
  178.     public function setRgpdFile(string $rgpdFile): self
  179.     {
  180.         $this->rgpdFile $rgpdFile;
  181.         return $this;
  182.     }
  183.     public function getDescription(): ?string
  184.     {
  185.         return $this->description;
  186.     }
  187.     public function setDescription(?string $description): self
  188.     {
  189.         $this->description $description;
  190.         return $this;
  191.     }
  192.     public function getBaseline(): ?string
  193.     {
  194.         return $this->baseline;
  195.     }
  196.     public function setBaseline(string $baseline): self
  197.     {
  198.         $this->baseline $baseline;
  199.         return $this;
  200.     }
  201.     public function getBackground(): ?string
  202.     {
  203.         return $this->background;
  204.     }
  205.     public function setBackground(string $background): self
  206.     {
  207.         $this->background $background;
  208.         return $this;
  209.     }
  210.     public function getAltLogo(): ?string
  211.     {
  212.         return $this->altLogo;
  213.     }
  214.     public function setAltLogo(string $altLogo): self
  215.     {
  216.         $this->altLogo $altLogo;
  217.         return $this;
  218.     }
  219.     public function isIsActive(): ?bool
  220.     {
  221.         return $this->isActive;
  222.     }
  223.     public function setIsActive(bool $isActive): self
  224.     {
  225.         $this->isActive $isActive;
  226.         return $this;
  227.     }
  228.     public function getCreatedAt(): ?\DateTimeInterface
  229.     {
  230.         return $this->createdAt;
  231.     }
  232.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  233.     {
  234.         $this->createdAt $createdAt;
  235.         return $this;
  236.     }
  237.     public function getModifiedAt(): ?\DateTimeInterface
  238.     {
  239.         return $this->modifiedAt;
  240.     }
  241.     public function setModifiedAt(\DateTimeInterface $modifiedAt): self
  242.     {
  243.         $this->modifiedAt $modifiedAt;
  244.         return $this;
  245.     }
  246.     /**
  247.      * @return Collection<int, ClientProduct>
  248.      */
  249.     public function getClientProducts(): Collection
  250.     {
  251.         return $this->clientProducts;
  252.     }
  253.     public function addClientProduct(ClientProduct $clientProduct): self
  254.     {
  255.         if (!$this->clientProducts->contains($clientProduct)) {
  256.             $this->clientProducts[] = $clientProduct;
  257.             $clientProduct->setClient($this);
  258.         }
  259.         return $this;
  260.     }
  261.     public function removeClientProduct(ClientProduct $clientProduct): self
  262.     {
  263.         if ($this->clientProducts->removeElement($clientProduct)) {
  264.             // set the owning side to null (unless already changed)
  265.             if ($clientProduct->getClient() === $this) {
  266.                 $clientProduct->setClient(null);
  267.             }
  268.         }
  269.         return $this;
  270.     }
  271.     /**
  272.      * @return Collection<int, Location>
  273.      */
  274.     public function getLocations(): Collection
  275.     {
  276.         return $this->locations;
  277.     }
  278.     public function addLocation(Location $location): self
  279.     {
  280.         if (!$this->locations->contains($location)) {
  281.             $this->locations[] = $location;
  282.             $location->setClient($this);
  283.         }
  284.         return $this;
  285.     }
  286.     public function removeLocation(Location $location): self
  287.     {
  288.         if ($this->locations->removeElement($location)) {
  289.             // set the owning side to null (unless already changed)
  290.             if ($location->getClient() === $this) {
  291.                 $location->setClient(null);
  292.             }
  293.         }
  294.         return $this;
  295.     }
  296.     /**
  297.      * @return Collection<int, SubLocation>
  298.      */
  299.     public function getSubLocations(): Collection
  300.     {
  301.         return $this->subLocations;
  302.     }
  303.     public function addSubLocation(SubLocation $subLocation): self
  304.     {
  305.         if (!$this->subLocations->contains($subLocation)) {
  306.             $this->subLocations[] = $subLocation;
  307.             $subLocation->setClient($this);
  308.         }
  309.         return $this;
  310.     }
  311.     public function removeSubLocation(SubLocation $subLocation): self
  312.     {
  313.         if ($this->subLocations->removeElement($subLocation)) {
  314.             // set the owning side to null (unless already changed)
  315.             if ($subLocation->getClient() === $this) {
  316.                 $subLocation->setClient(null);
  317.             }
  318.         }
  319.         return $this;
  320.     }
  321.     /**
  322.      * @return Collection<int, Domain>
  323.      */
  324.     public function getDomains(): Collection
  325.     {
  326.         return $this->domains;
  327.     }
  328.     public function addDomain(Domain $domain): self
  329.     {
  330.         if (!$this->domains->contains($domain)) {
  331.             $this->domains[] = $domain;
  332.             $domain->setClient($this);
  333.         }
  334.         return $this;
  335.     }
  336.     public function removeDomain(Domain $domain): self
  337.     {
  338.         if ($this->domains->removeElement($domain)) {
  339.             // set the owning side to null (unless already changed)
  340.             if ($domain->getClient() === $this) {
  341.                 $domain->setClient(null);
  342.             }
  343.         }
  344.         return $this;
  345.     }
  346.     /**
  347.      * @return Collection<int, Domain>
  348.      */
  349.     public function getDomain(): Collection
  350.     {
  351.         return $this->domain;
  352.     }
  353.     public function getSalt(): ?string
  354.     {
  355.         return $this->salt;
  356.     }
  357.     public function setSalt(string $salt): self
  358.     {
  359.         $this->salt $salt;
  360.         return $this;
  361.     }
  362.     /**
  363.      * @return Collection<int, User>
  364.      */
  365.     public function getUsers(): Collection
  366.     {
  367.         return $this->users;
  368.     }
  369.     public function addUser(User $user): self
  370.     {
  371.         if (!$this->users->contains($user)) {
  372.             $this->users[] = $user;
  373.             $user->setClient($this);
  374.         }
  375.         return $this;
  376.     }
  377.     public function removeUser(User $user): self
  378.     {
  379.         if ($this->users->removeElement($user)) {
  380.             // set the owning side to null (unless already changed)
  381.             if ($user->getClient() === $this) {
  382.                 $user->setClient(null);
  383.             }
  384.         }
  385.         return $this;
  386.     }
  387.     /**
  388.      * @return Collection<int, Job>
  389.      */
  390.     public function getJobs(): Collection
  391.     {
  392.         return $this->jobs;
  393.     }
  394.     public function addJob(Job $job): self
  395.     {
  396.         if (!$this->jobs->contains($job)) {
  397.             $this->jobs[] = $job;
  398.             $job->setClient($this);
  399.         }
  400.         return $this;
  401.     }
  402.     public function removeJob(Job $job): self
  403.     {
  404.         if ($this->jobs->removeElement($job)) {
  405.             // set the owning side to null (unless already changed)
  406.             if ($job->getClient() === $this) {
  407.                 $job->setClient(null);
  408.             }
  409.         }
  410.         return $this;
  411.     }
  412.     /**
  413.      * @return Collection<int, Contact>
  414.      */
  415.     public function getContacts(): Collection
  416.     {
  417.         return $this->contacts;
  418.     }
  419.     public function addContact(Contact $contact): self
  420.     {
  421.         if (!$this->contacts->contains($contact)) {
  422.             $this->contacts[] = $contact;
  423.             $contact->setClient($this);
  424.         }
  425.         return $this;
  426.     }
  427.     public function removeContact(Contact $contact): self
  428.     {
  429.         if ($this->contacts->removeElement($contact)) {
  430.             // set the owning side to null (unless already changed)
  431.             if ($contact->getClient() === $this) {
  432.                 $contact->setClient(null);
  433.             }
  434.         }
  435.         return $this;
  436.     }
  437.     public function getMainColor(): ?string
  438.     {
  439.         return $this->mainColor;
  440.     }
  441.     public function setMainColor(string $mainColor): self
  442.     {
  443.         $this->mainColor $mainColor;
  444.         return $this;
  445.     }
  446.     public function getSecondaryColor(): ?string
  447.     {
  448.         return $this->secondaryColor;
  449.     }
  450.     public function setSecondaryColor(string $secondaryColor): self
  451.     {
  452.         $this->secondaryColor $secondaryColor;
  453.         return $this;
  454.     }
  455.     public function isIsSecure(): ?bool
  456.     {
  457.         return $this->isSecure;
  458.     }
  459.     public function setIsSecure(bool $isSecure): self
  460.     {
  461.         $this->isSecure $isSecure;
  462.         return $this;
  463.     }
  464.     public function isIsHiddenJobTitle(): ?bool
  465.     {
  466.         return $this->isHiddenJobTitle;
  467.     }
  468.     public function setIsHiddenJobTitle(bool $isHiddenJobTitle): self
  469.     {
  470.         $this->isHiddenJobTitle $isHiddenJobTitle;
  471.         return $this;
  472.     }
  473.     public function isIsHiddenUserJob(): ?bool
  474.     {
  475.         return $this->isHiddenUserJob;
  476.     }
  477.     public function setIsHiddenUserJob(bool $isHiddenUserJob): self
  478.     {
  479.         $this->isHiddenUserJob $isHiddenUserJob;
  480.         return $this;
  481.     }
  482.     public function getLabelLocation(): ?string
  483.     {
  484.         return $this->labelLocation;
  485.     }
  486.     public function setLabelLocation(string $labelLocation): self
  487.     {
  488.         $this->labelLocation $labelLocation;
  489.         return $this;
  490.     }
  491.     public function getLabelSubLocation(): ?string
  492.     {
  493.         return $this->labelSubLocation;
  494.     }
  495.     public function setLabelSubLocation(string $labelSubLocation): self
  496.     {
  497.         $this->labelSubLocation $labelSubLocation;
  498.         return $this;
  499.     }
  500.     public function isHasMicrosoft(): ?bool
  501.     {
  502.         return $this->hasMicrosoft;
  503.     }
  504.     public function setHasMicrosoft(bool $hasMicrosoft): self
  505.     {
  506.         $this->hasMicrosoft $hasMicrosoft;
  507.         return $this;
  508.     }
  509.     public function isHasZoom(): ?bool
  510.     {
  511.         return $this->hasZoom;
  512.     }
  513.     public function setHasZoom(bool $hasZoom): self
  514.     {
  515.         $this->hasZoom $hasZoom;
  516.         return $this;
  517.     }
  518. }