<?php
namespace App\Entity;
use App\Repository\VCardsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* VCards
*
*/
#[ORM\Table(name: 'vcards')]
#[ORM\Entity(repositoryClass: VCardsRepository::class)]
class VCards
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $picture;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $firstname;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $lastname;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fonction;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $cabinet;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $address;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $zipCode;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $city;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $phonefix;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $phone;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $email;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $website;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $linkedin;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $facebook;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $twitter;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $instagram;
#[ORM\ManyToOne(targetEntity: 'AccountingFirm', inversedBy: 'vcards')]
private $accountingFirm;
#[ORM\OneToMany(mappedBy: 'vcard', targetEntity: VCardPhone::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $phones;
#[ORM\OneToMany(mappedBy: 'vcard', targetEntity: VCardAddress::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $addresses;
public function __construct()
{
$this->phones = new ArrayCollection();
$this->addresses = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPicture(): ?string
{
return $this->picture;
}
public function setPicture(?string $picture): self
{
$this->picture = $picture;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstname;
}
public function setFirstName(string $firstname): self
{
$this->firstname = $firstname;
return $this;
}
public function getLastName(): ?string
{
return $this->lastname;
}
public function setLastName(string $lastname): self
{
$this->lastname = $lastname;
return $this;
}
public function getFonction(): ?string
{
return $this->fonction;
}
public function setFonction(?string $fonction): self
{
$this->fonction = $fonction;
return $this;
}
public function getCabinet(): ?string
{
return $this->cabinet;
}
public function setCabinet(?string $cabinet): self
{
$this->cabinet = $cabinet;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getPhoneFix(): ?string
{
return $this->phonefix;
}
public function setPhoneFix(?string $phonefix): self
{
$this->phonefix = $phonefix;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(?string $zipCode): self
{
$this->zipCode = $zipCode;
return $this;
}
public function getWebSite(): ?string
{
return $this->website;
}
public function setWebSite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getlinkedin(): ?string
{
return $this->linkedin;
}
public function setlinkedin(?string $linkedin): self
{
$this->linkedin = $linkedin;
return $this;
}
public function getfacebook(): ?string
{
return $this->facebook;
}
public function setfacebook(?string $facebook): self
{
$this->facebook = $facebook;
return $this;
}
public function gettwitter(): ?string
{
return $this->twitter;
}
public function settwitter(?string $twitter): self
{
$this->twitter = $twitter;
return $this;
}
public function getinstagram(): ?string
{
return $this->instagram;
}
public function setinstagram(?string $instagram): self
{
$this->instagram = $instagram;
return $this;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(?AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
/**
* @return Collection<int, VCardPhone>
*/
public function getPhones(): Collection
{
return $this->phones;
}
public function addPhone(VCardPhone $phone): self
{
if (!$this->phones->contains($phone)) {
$this->phones[] = $phone;
$phone->setVcard($this);
}
return $this;
}
public function removePhone(VCardPhone $phone): self
{
if ($this->phones->removeElement($phone)) {
// set the owning side to null (unless already changed)
if ($phone->getVcard() === $this) {
$phone->setVcard(null);
}
}
return $this;
}
/**
* @return Collection<int, VCardAddress>
*/
public function getAddresses(): Collection
{
return $this->addresses;
}
public function addAddress(VCardAddress $address): self
{
if (!$this->addresses->contains($address)) {
$this->addresses[] = $address;
$address->setVcard($this);
}
return $this;
}
public function removeAddress(VCardAddress $address): self
{
if ($this->addresses->removeElement($address)) {
// set the owning side to null (unless already changed)
if ($address->getVcard() === $this) {
$address->setVcard(null);
}
}
return $this;
}
}