<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\OneToOne;
use App\Entity\PriceLevel;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\ContactRepo")
* @ORM\Table(name="contact")
*/
class Contact
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private int $contactId=0;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $title='';
/**
* @ORM\Column(type="string", name="first_name", length=255, nullable=true)
*/
protected $firstName;
/**
* @ORM\Column(type="string", name="middle_name", length=255, nullable=true)
*/
protected $middleName;
/**
* @ORM\Column(type="string", name="last_name", length=255, nullable=true)
*/
protected $lastName;
/**
* @ORM\Column(type="string", name="nick_name", length=255, nullable=true)
*/
protected $nickName;
/**
* @ORM\Column(type="string", name="company_name", length=255, nullable=true)
*/
protected $companyName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $email;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $email2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $email3;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $phone2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $phone3;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $address1;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $address2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $zipCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $country;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $invoiceAddress1;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $invoiceAddress2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $invoiceZipCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $invoiceCountry;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $image1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $image2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $contactUserName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $contactUserPassword;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $businessId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $DICId;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $notes;
/*
* @ORM\OneToOne(targetEntity="Address", mappedBy="Contact", cascade={"persist"})
* @ORM\JoinColumn(name="address_id", referencedColumnName="address")
*/
// #[OneToOne(targetEntity: Shipment::class)]
// #[JoinColumn(name: 'shipment_id', referencedColumnName: 'id')]
/*
* @ORM\OneToOne(targetEntity="Address")
* @ORM\JoinColumn(name="address_id", referencedColumnName="address_id")
*/
/*
* @ORM\OneToOne(targetEntity="Address", cascade={"persist", "remove"})
* @ORM\JoinColumn(name="address_id", referencedColumnName="contact_id", nullable=true)
*/
/*
* @ORM\OneToOne(targetEntity="Address", mappedBy="contact", cascade={"persist", "remove"})
*/
/**
* @ORM\ManyToOne(targetEntity="Address", cascade={"persist"})
* @ORM\JoinColumn(name="address_id", referencedColumnName="address_id")
*/
protected $address;
/*
* @ORM\OneToMany(targetEntity="Address", mappedBy="Contact", cascade={"persist"})
* @ORM\JoinColumn(name="delivery_address_id", referencedColumnName="address_id")
*/
/*
* @ORM\OneToOne(targetEntity="Address")
* @ORM\JoinColumn(name="delivery_address_id", referencedColumnName="address_id")
*/
/*
* @ORM\OneToOne(targetEntity="Address", mappedBy="contact", cascade={"persist", "remove"})
*/
/**
* @ORM\ManyToOne(targetEntity="Address", cascade={"persist"})
* @ORM\JoinColumn(name="delivery_address_id", referencedColumnName="address_id")
*/
protected $deliveryAddress;
/**
* Many Contacts have Many ContactGroups.
* @ORM\ManyToMany(targetEntity="ContactGroup")
* @ORM\JoinTable(name="contact_contact_group",
* joinColumns={@ORM\JoinColumn(name="contact_id", referencedColumnName="contact_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="contact_group_id", referencedColumnName="contact_group_id", unique=false)}
* )
*/
protected $contactGroups;
/**
* Many Contacts have Many Consents.
* @ORM\ManyToMany(targetEntity="Consent")
* @ORM\JoinTable(name="contact_consent",
* joinColumns={@ORM\JoinColumn(name="contact_id", referencedColumnName="contact_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="consent_id", referencedColumnName="consent_id", unique=false)}
* )
*/
protected Collection $consents;
/*
* @ORM\OneToOne(targetEntity="PriceLevel", mappedBy="contact")
* @ORM\JoinTable(name="price_level")
*/
/*
* @ORM\OneToOne(targetEntity="PriceLevel", mappedBy="contact", cascade={"persist", "remove"})
*/
/*
* One Contact has One PriceLevel.
* @OneToOne(targetEntity="PriceLevel")
* @JoinColumn(name="price_level_id", referencedColumnName="price_level_id")
*/
/*
* Many Contacts have One PriceLevel.
* @ORM\ManyToOne(targetEntity="PriceLevel")
* @ORM\JoinColumn(name="price_level_id", referencedColumnName="price_level_id")
*/
/**
* @ORM\ManyToOne(targetEntity="PriceLevel", cascade={"persist"})
* @ORM\JoinColumn(name="price_level_id", referencedColumnName="price_level_id")
*/
protected $priceLevel;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $ERPKey;
public function __construct()
{
$this->contactGroups = new ArrayCollection();
$this->consents = new ArrayCollection();
}
public function getContactId(): ?int
{
return $this->contactId;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): static
{
$this->title = $title;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): static
{
$this->firstName = $firstName;
return $this;
}
public function getMiddleName(): ?string
{
return $this->middleName;
}
public function setMiddleName(?string $middleName): static
{
$this->middleName = $middleName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): static
{
$this->lastName = $lastName;
return $this;
}
public function getNickName(): ?string
{
return $this->nickName;
}
public function setNickName(?string $nickName): static
{
$this->nickName = $nickName;
return $this;
}
public function getCompanyName(): ?string
{
return $this->companyName;
}
public function setCompanyName(?string $companyName): static
{
$this->companyName = $companyName;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): static
{
$this->email = $email;
return $this;
}
public function getEmail2(): ?string
{
return $this->email2;
}
public function setEmail2(?string $email2): static
{
$this->email2 = $email2;
return $this;
}
public function getEmail3(): ?string
{
return $this->email3;
}
public function setEmail3(?string $email3): static
{
$this->email3 = $email3;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): static
{
$this->phone = $phone;
return $this;
}
public function getPhone2(): ?string
{
return $this->phone2;
}
public function setPhone2(?string $phone2): static
{
$this->phone2 = $phone2;
return $this;
}
public function getPhone3(): ?string
{
return $this->phone3;
}
public function setPhone3(?string $phone3): static
{
$this->phone3 = $phone3;
return $this;
}
public function getAddress1(): ?string
{
return $this->address1;
}
public function setAddress1(?string $address1): static
{
$this->address1 = $address1;
return $this;
}
public function getAddress2(): ?string
{
return $this->address2;
}
public function setAddress2(?string $address2): static
{
$this->address2 = $address2;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(?string $zipCode): static
{
$this->zipCode = $zipCode;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): static
{
$this->country = $country;
return $this;
}
public function getInvoiceAddress1(): ?string
{
return $this->invoiceAddress1;
}
public function setInvoiceAddress1(?string $invoiceAddress1): static
{
$this->invoiceAddress1 = $invoiceAddress1;
return $this;
}
public function getInvoiceAddress2(): ?string
{
return $this->invoiceAddress2;
}
public function setInvoiceAddress2(?string $invoiceAddress2): static
{
$this->invoiceAddress2 = $invoiceAddress2;
return $this;
}
public function getInvoiceZipCode(): ?string
{
return $this->invoiceZipCode;
}
public function setInvoiceZipCode(?string $invoiceZipCode): static
{
$this->invoiceZipCode = $invoiceZipCode;
return $this;
}
public function getInvoiceCountry(): ?string
{
return $this->invoiceCountry;
}
public function setInvoiceCountry(?string $invoiceCountry): static
{
$this->invoiceCountry = $invoiceCountry;
return $this;
}
public function getImage1(): ?string
{
return $this->image1;
}
public function setImage1(?string $image1): static
{
$this->image1 = $image1;
return $this;
}
public function getImage2(): ?string
{
return $this->image2;
}
public function setImage2(?string $image2): static
{
$this->image2 = $image2;
return $this;
}
public function getContactUserName(): ?string
{
return $this->contactUserName;
}
public function setContactUserName(?string $contactUserName): static
{
$this->contactUserName = $contactUserName;
return $this;
}
public function getContactUserPassword(): ?string
{
return $this->contactUserPassword;
}
public function setContactUserPassword(?string $contactUserPassword): static
{
$this->contactUserPassword = $contactUserPassword;
return $this;
}
public function getBusinessId(): ?string
{
return $this->businessId;
}
public function setBusinessId(?string $businessId): static
{
$this->businessId = $businessId;
return $this;
}
public function getDICId(): ?string
{
return $this->DICId;
}
public function setDICId(?string $DICId): static
{
$this->DICId = $DICId;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): static
{
$this->notes = $notes;
return $this;
}
public function getERPKey(): ?string
{
return $this->ERPKey;
}
public function setERPKey(?string $ERPKey): static
{
$this->ERPKey = $ERPKey;
return $this;
}
public function getAddress(): ?Address
{
return $this->address;
}
public function setAddress(?Address $address): static
{
$this->address = $address;
return $this;
}
public function getDeliveryAddress(): ?Address
{
return $this->deliveryAddress;
}
public function setDeliveryAddress(?Address $deliveryAddress): static
{
$this->deliveryAddress = $deliveryAddress;
return $this;
}
/**
* @return Collection<int, ContactGroup>
*/
public function getContactGroups(): Collection
{
return $this->contactGroups;
}
public function addContactGroup(ContactGroup $contactGroup): static
{
if (!$this->contactGroups->contains($contactGroup)) {
$this->contactGroups->add($contactGroup);
}
return $this;
}
public function removeContactGroup(ContactGroup $contactGroup): static
{
$this->contactGroups->removeElement($contactGroup);
return $this;
}
/**
* @return Collection<int, Consent>
*/
public function getConsents(): Collection
{
return $this->consents;
}
public function addConsent(Consent $consent): static
{
if (!$this->consents->contains($consent)) {
$this->consents->add($consent);
}
return $this;
}
public function removeConsent(Consent $consent): static
{
$this->consents->removeElement($consent);
return $this;
}
public function getPriceLevel(): ?PriceLevel
{
return $this->priceLevel;
}
public function setPriceLevel(?PriceLevel $priceLevel): static
{
$this->priceLevel = $priceLevel;
return $this;
}
}