src/Entity/VCards.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VCardsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * VCards
  9.  *
  10.  */
  11. #[ORM\Table(name'vcards')]
  12. #[ORM\Entity(repositoryClassVCardsRepository::class)]
  13. class VCards
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     private $id;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $picture;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $firstname;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $lastname;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private $fonction;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private $cabinet;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private $address;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private $zipCode;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $city;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $phonefix;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private $phone;
  39.     #[ORM\Column(type'string'length255nullabletrue)]
  40.     private $email;
  41.     #[ORM\Column(type'string'length255nullabletrue)]
  42.     private $website;
  43.     #[ORM\Column(type'string'length255nullabletrue)]
  44.     private $linkedin;
  45.     #[ORM\Column(type'string'length255nullabletrue)]
  46.     private $facebook;
  47.     #[ORM\Column(type'string'length255nullabletrue)]
  48.     private $twitter;
  49.     #[ORM\Column(type'string'length255nullabletrue)]
  50.     private $instagram;
  51.     #[ORM\ManyToOne(targetEntity'AccountingFirm'inversedBy'vcards')]
  52.     private $accountingFirm;
  53.     #[ORM\OneToMany(mappedBy'vcard'targetEntityVCardPhone::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  54.     private Collection $phones;
  55.     #[ORM\OneToMany(mappedBy'vcard'targetEntityVCardAddress::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  56.     private Collection $addresses;
  57.     public function __construct()
  58.     {
  59.         $this->phones = new ArrayCollection();
  60.         $this->addresses = new ArrayCollection();
  61.     }
  62.     public function getId(): ?int
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getPicture(): ?string
  67.     {
  68.         return $this->picture;
  69.     }
  70.     public function setPicture(?string $picture): self
  71.     {
  72.         $this->picture $picture;
  73.         return $this;
  74.     }
  75.     public function getFirstName(): ?string
  76.     {
  77.         return $this->firstname;
  78.     }
  79.     public function setFirstName(string $firstname): self
  80.     {
  81.         $this->firstname $firstname;
  82.         return $this;
  83.     }
  84.     public function getLastName(): ?string
  85.     {
  86.         return $this->lastname;
  87.     }
  88.     public function setLastName(string $lastname): self
  89.     {
  90.         $this->lastname $lastname;
  91.         return $this;
  92.     }
  93.     public function getFonction(): ?string
  94.     {
  95.         return $this->fonction;
  96.     }
  97.     public function setFonction(?string $fonction): self
  98.     {
  99.         $this->fonction $fonction;
  100.         return $this;
  101.     }
  102.     public function getCabinet(): ?string
  103.     {
  104.         return $this->cabinet;
  105.     }
  106.     public function setCabinet(?string $cabinet): self
  107.     {
  108.         $this->cabinet $cabinet;
  109.         return $this;
  110.     }
  111.     public function getEmail(): ?string
  112.     {
  113.         return $this->email;
  114.     }
  115.     public function setEmail(?string $email): self
  116.     {
  117.         $this->email $email;
  118.         return $this;
  119.     }
  120.     public function getPhone(): ?string
  121.     {
  122.         return $this->phone;
  123.     }
  124.     public function setPhone(?string $phone): self
  125.     {
  126.         $this->phone $phone;
  127.         return $this;
  128.     }
  129.     public function getPhoneFix(): ?string
  130.     {
  131.         return $this->phonefix;
  132.     }
  133.     public function setPhoneFix(?string $phonefix): self
  134.     {
  135.         $this->phonefix $phonefix;
  136.         return $this;
  137.     }
  138.     public function getAddress(): ?string
  139.     {
  140.         return $this->address;
  141.     }
  142.     public function setAddress(?string $address): self
  143.     {
  144.         $this->address $address;
  145.         return $this;
  146.     }
  147.     public function getCity(): ?string
  148.     {
  149.         return $this->city;
  150.     }
  151.     public function setCity(?string $city): self
  152.     {
  153.         $this->city $city;
  154.         return $this;
  155.     }
  156.     public function getZipCode(): ?string
  157.     {
  158.         return $this->zipCode;
  159.     }
  160.     public function setZipCode(?string $zipCode): self
  161.     {
  162.         $this->zipCode $zipCode;
  163.         return $this;
  164.     }
  165.     public function getWebSite(): ?string
  166.     {
  167.         return $this->website;
  168.     }
  169.     public function setWebSite(?string $website): self
  170.     {
  171.         $this->website $website;
  172.         return $this;
  173.     }
  174.     public function getlinkedin(): ?string
  175.     {
  176.         return $this->linkedin;
  177.     }
  178.     public function setlinkedin(?string $linkedin): self
  179.     {
  180.         $this->linkedin $linkedin;
  181.         return $this;
  182.     }
  183.     public function getfacebook(): ?string
  184.     {
  185.         return $this->facebook;
  186.     }
  187.     public function setfacebook(?string $facebook): self
  188.     {
  189.         $this->facebook $facebook;
  190.         return $this;
  191.     }
  192.     public function gettwitter(): ?string
  193.     {
  194.         return $this->twitter;
  195.     }
  196.     public function settwitter(?string $twitter): self
  197.     {
  198.         $this->twitter $twitter;
  199.         return $this;
  200.     }
  201.     public function getinstagram(): ?string
  202.     {
  203.         return $this->instagram;
  204.     }
  205.     public function setinstagram(?string $instagram): self
  206.     {
  207.         $this->instagram $instagram;
  208.         return $this;
  209.     }
  210.     public function getAccountingFirm(): ?AccountingFirm
  211.     {
  212.         return $this->accountingFirm;
  213.     }
  214.     public function setAccountingFirm(?AccountingFirm $accountingFirm): self
  215.     {
  216.         $this->accountingFirm $accountingFirm;
  217.         return $this;
  218.     }
  219.     /**
  220.      * @return Collection<int, VCardPhone>
  221.      */
  222.     public function getPhones(): Collection
  223.     {
  224.         return $this->phones;
  225.     }
  226.     public function addPhone(VCardPhone $phone): self
  227.     {
  228.         if (!$this->phones->contains($phone)) {
  229.             $this->phones[] = $phone;
  230.             $phone->setVcard($this);
  231.         }
  232.         return $this;
  233.     }
  234.     public function removePhone(VCardPhone $phone): self
  235.     {
  236.         if ($this->phones->removeElement($phone)) {
  237.             // set the owning side to null (unless already changed)
  238.             if ($phone->getVcard() === $this) {
  239.                 $phone->setVcard(null);
  240.             }
  241.         }
  242.         return $this;
  243.     }
  244.     /**
  245.      * @return Collection<int, VCardAddress>
  246.      */
  247.     public function getAddresses(): Collection
  248.     {
  249.         return $this->addresses;
  250.     }
  251.     public function addAddress(VCardAddress $address): self
  252.     {
  253.         if (!$this->addresses->contains($address)) {
  254.             $this->addresses[] = $address;
  255.             $address->setVcard($this);
  256.         }
  257.         return $this;
  258.     }
  259.     public function removeAddress(VCardAddress $address): self
  260.     {
  261.         if ($this->addresses->removeElement($address)) {
  262.             // set the owning side to null (unless already changed)
  263.             if ($address->getVcard() === $this) {
  264.                 $address->setVcard(null);
  265.             }
  266.         }
  267.         return $this;
  268.     }
  269. }