<?php
namespace App\Entity;
use App\Repository\SupplierRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SupplierRepository::class)
*/
class Supplier {
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $usermane;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $civility;
/**
* @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 $email;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $second_phone;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $adress;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $second_adress;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $country;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $region;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $city;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $tariff_category;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $zip;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity=Link::class, mappedBy="supplier")
*/
private $links;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\OneToMany(targetEntity=Document::class, mappedBy="supplier")
*/
private $documents;
/**
* @ORM\OneToMany(targetEntity=Address::class, mappedBy="supplier")
*/
private $multiAddress;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $type;
/**
* @ORM\OneToMany(targetEntity=user::class, mappedBy="supplier")
*/
private $contacts;
public function __construct()
{
$this->links = new ArrayCollection();
$this->documents = new ArrayCollection();
$this->multiAddress = new ArrayCollection();
$this->contacts = new ArrayCollection();
}
public function getId(): ?int {
return $this->id;
}
public function getUsermane(): ?string {
return $this->usermane;
}
public function setUsermane(string $usermane): self {
$this->usermane = $usermane;
return $this;
}
public function getUsername(): string {
return (string) $this->usermane;
}
public function getCivility(): ?string {
return $this->civility;
}
public function setCivility(string $civility): self {
$this->civility = $civility;
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 getEmail(): ?string {
return $this->email;
}
public function setEmail(string $email): self {
$this->email = $email;
return $this;
}
public function getDescription(): ?string {
return $this->description;
}
public function setDescription(string $description): self {
$this->description = $description;
return $this;
}
public function getPhone(): ?string {
return $this->phone;
}
public function setPhone(string $phone): self {
$this->phone = $phone;
return $this;
}
public function getSecondPhone(): ?string {
return $this->second_phone;
}
public function setSecondPhone(?string $second_phone): self {
$this->second_phone = $second_phone;
return $this;
}
public function getAdress(): ?string {
return $this->adress;
}
public function setAdress(string $adress): self {
$this->adress = $adress;
return $this;
}
public function getSecondAdress(): ?string {
return $this->second_adress;
}
public function setSecondAdress(?string $second_adress): self {
$this->second_adress = $second_adress;
return $this;
}
public function getCountry(): ?string {
return $this->country;
}
public function setCountry(string $country): self {
$this->country = $country;
return $this;
}
public function getRegion(): ?string {
return $this->region;
}
public function setRegion(string $region): self {
$this->region = $region;
return $this;
}
public function getCity(): ?string {
return $this->city;
}
public function setCity(string $city): self {
$this->city = $city;
return $this;
}
public function getTariffCategory(): ?string {
return $this->tariff_category;
}
public function setTariffCategory(?string $tariff_category): self {
$this->tariff_category = $tariff_category;
return $this;
}
public function getZip(): ?string {
return $this->zip;
}
public function setZip(string $zip): self {
$this->zip = $zip;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return Collection|Link[]
*/
public function getLinks(): Collection
{
return $this->links;
}
public function addLink(Link $link): self
{
if (!$this->links->contains($link)) {
$this->links[] = $link;
$link->setSupplier($this);
}
return $this;
}
public function removeLink(Link $link): self
{
if ($this->links->removeElement($link)) {
// set the owning side to null (unless already changed)
if ($link->getSupplier() === $this) {
$link->setSupplier(null);
}
}
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return Collection|Document[]
*/
public function getDocuments(): Collection
{
return $this->documents;
}
public function addDocument(Document $document): self
{
if (!$this->documents->contains($document)) {
$this->documents[] = $document;
$document->setSupplier($this);
}
return $this;
}
public function removeDocument(Document $document): self
{
if ($this->documents->removeElement($document)) {
// set the owning side to null (unless already changed)
if ($document->getSupplier() === $this) {
$document->setSupplier(null);
}
}
return $this;
}
/**
* @return Collection|Address[]
*/
public function getMultiAddress(): Collection
{
return $this->multiAddress;
}
public function addMultiAddress(Address $multiAddress): self
{
if (!$this->multiAddress->contains($multiAddress)) {
$this->multiAddress[] = $multiAddress;
$multiAddress->setSupplier($this);
}
return $this;
}
public function removeMultiAddress(Address $multiAddress): self
{
if ($this->multiAddress->removeElement($multiAddress)) {
// set the owning side to null (unless already changed)
if ($multiAddress->getSupplier() === $this) {
$multiAddress->setSupplier(null);
}
}
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
/**
* @return Collection|user[]
*/
public function getContacts(): Collection
{
return $this->contacts;
}
public function addContact(user $contact): self
{
if (!$this->contacts->contains($contact)) {
$this->contacts[] = $contact;
$contact->setSupplier($this);
}
return $this;
}
public function removeContact(user $contact): self
{
if ($this->contacts->removeElement($contact)) {
// set the owning side to null (unless already changed)
if ($contact->getSupplier() === $this) {
$contact->setSupplier(null);
}
}
return $this;
}
}