src/Entity/Supplier.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SupplierRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SupplierRepository::class)
  9.  */
  10. class Supplier {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=180, nullable=true)
  19.      */
  20.     private $usermane;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $civility;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $firstName;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $LastName;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $email;
  37.     /**
  38.      * @ORM\Column(type="text", nullable=true)
  39.      */
  40.     private $description;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $phone;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $second_phone;
  49.     /**
  50.      * @ORM\Column(type="text", nullable=true)
  51.      */
  52.     private $adress;
  53.     /**
  54.      * @ORM\Column(type="text", nullable=true)
  55.      */
  56.     private $second_adress;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $country;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $region;
  65.     /**
  66.      * @ORM\Column(type="string", length=255, nullable=true)
  67.      */
  68.     private $city;
  69.     /**
  70.      * @ORM\Column(type="string", length=255, nullable=true)
  71.      */
  72.     private $tariff_category;
  73.     /**
  74.      * @ORM\Column(type="string", length=255, nullable=true)
  75.      */
  76.     private $zip;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      */
  80.     private $name;
  81.     /**
  82.      * @ORM\OneToMany(targetEntity=Link::class, mappedBy="supplier")
  83.      */
  84.     private $links;
  85.     /**
  86.      * @ORM\Column(type="datetime")
  87.      */
  88.     private $createdAt;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity=Document::class, mappedBy="supplier")
  91.      */
  92.     private $documents;
  93.     /**
  94.      * @ORM\OneToMany(targetEntity=Address::class, mappedBy="supplier")
  95.      */
  96.     private $multiAddress;
  97.     /**
  98.      * @ORM\Column(type="string", length=255, nullable=true)
  99.      */
  100.     private $type;
  101.     /**
  102.      * @ORM\OneToMany(targetEntity=user::class, mappedBy="supplier")
  103.      */
  104.     private $contacts;
  105.     public function __construct()
  106.     {
  107.         $this->links = new ArrayCollection();
  108.         $this->documents = new ArrayCollection();
  109.         $this->multiAddress = new ArrayCollection();
  110.         $this->contacts = new ArrayCollection();
  111.     }
  112.     public function getId(): ?int {
  113.         return $this->id;
  114.     }
  115.     public function getUsermane(): ?string {
  116.         return $this->usermane;
  117.     }
  118.     public function setUsermane(string $usermane): self {
  119.         $this->usermane $usermane;
  120.         return $this;
  121.     }
  122.     public function getUsername(): string {
  123.         return (string) $this->usermane;
  124.     }
  125.     public function getCivility(): ?string {
  126.         return $this->civility;
  127.     }
  128.     public function setCivility(string $civility): self {
  129.         $this->civility $civility;
  130.         return $this;
  131.     }
  132.     public function getFirstName(): ?string {
  133.         return $this->firstName;
  134.     }
  135.     public function setFirstName(string $firstName): self {
  136.         $this->firstName $firstName;
  137.         return $this;
  138.     }
  139.     public function getLastName(): ?string {
  140.         return $this->LastName;
  141.     }
  142.     public function setLastName(string $LastName): self {
  143.         $this->LastName $LastName;
  144.         return $this;
  145.     }
  146.     public function getEmail(): ?string {
  147.         return $this->email;
  148.     }
  149.     public function setEmail(string $email): self {
  150.         $this->email $email;
  151.         return $this;
  152.     }
  153.     public function getDescription(): ?string {
  154.         return $this->description;
  155.     }
  156.     public function setDescription(string $description): self {
  157.         $this->description $description;
  158.         return $this;
  159.     }
  160.     public function getPhone(): ?string {
  161.         return $this->phone;
  162.     }
  163.     public function setPhone(string $phone): self {
  164.         $this->phone $phone;
  165.         return $this;
  166.     }
  167.     public function getSecondPhone(): ?string {
  168.         return $this->second_phone;
  169.     }
  170.     public function setSecondPhone(?string $second_phone): self {
  171.         $this->second_phone $second_phone;
  172.         return $this;
  173.     }
  174.     public function getAdress(): ?string {
  175.         return $this->adress;
  176.     }
  177.     public function setAdress(string $adress): self {
  178.         $this->adress $adress;
  179.         return $this;
  180.     }
  181.     public function getSecondAdress(): ?string {
  182.         return $this->second_adress;
  183.     }
  184.     public function setSecondAdress(?string $second_adress): self {
  185.         $this->second_adress $second_adress;
  186.         return $this;
  187.     }
  188.     public function getCountry(): ?string {
  189.         return $this->country;
  190.     }
  191.     public function setCountry(string $country): self {
  192.         $this->country $country;
  193.         return $this;
  194.     }
  195.     public function getRegion(): ?string {
  196.         return $this->region;
  197.     }
  198.     public function setRegion(string $region): self {
  199.         $this->region $region;
  200.         return $this;
  201.     }
  202.     public function getCity(): ?string {
  203.         return $this->city;
  204.     }
  205.     public function setCity(string $city): self {
  206.         $this->city $city;
  207.         return $this;
  208.     }
  209.     public function getTariffCategory(): ?string {
  210.         return $this->tariff_category;
  211.     }
  212.     public function setTariffCategory(?string $tariff_category): self {
  213.         $this->tariff_category $tariff_category;
  214.         return $this;
  215.     }
  216.     public function getZip(): ?string {
  217.         return $this->zip;
  218.     }
  219.     public function setZip(string $zip): self {
  220.         $this->zip $zip;
  221.         return $this;
  222.     }
  223.     public function getName(): ?string
  224.     {
  225.         return $this->name;
  226.     }
  227.     public function setName(?string $name): self
  228.     {
  229.         $this->name $name;
  230.         return $this;
  231.     }
  232.     /**
  233.      * @return Collection|Link[]
  234.      */
  235.     public function getLinks(): Collection
  236.     {
  237.         return $this->links;
  238.     }
  239.     public function addLink(Link $link): self
  240.     {
  241.         if (!$this->links->contains($link)) {
  242.             $this->links[] = $link;
  243.             $link->setSupplier($this);
  244.         }
  245.         return $this;
  246.     }
  247.     public function removeLink(Link $link): self
  248.     {
  249.         if ($this->links->removeElement($link)) {
  250.             // set the owning side to null (unless already changed)
  251.             if ($link->getSupplier() === $this) {
  252.                 $link->setSupplier(null);
  253.             }
  254.         }
  255.         return $this;
  256.     }
  257.     public function getCreatedAt(): ?\DateTimeInterface
  258.     {
  259.         return $this->createdAt;
  260.     }
  261.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  262.     {
  263.         $this->createdAt $createdAt;
  264.         return $this;
  265.     }
  266.     /**
  267.      * @return Collection|Document[]
  268.      */
  269.     public function getDocuments(): Collection
  270.     {
  271.         return $this->documents;
  272.     }
  273.     public function addDocument(Document $document): self
  274.     {
  275.         if (!$this->documents->contains($document)) {
  276.             $this->documents[] = $document;
  277.             $document->setSupplier($this);
  278.         }
  279.         return $this;
  280.     }
  281.     public function removeDocument(Document $document): self
  282.     {
  283.         if ($this->documents->removeElement($document)) {
  284.             // set the owning side to null (unless already changed)
  285.             if ($document->getSupplier() === $this) {
  286.                 $document->setSupplier(null);
  287.             }
  288.         }
  289.         return $this;
  290.     }
  291.     /**
  292.      * @return Collection|Address[]
  293.      */
  294.     public function getMultiAddress(): Collection
  295.     {
  296.         return $this->multiAddress;
  297.     }
  298.     public function addMultiAddress(Address $multiAddress): self
  299.     {
  300.         if (!$this->multiAddress->contains($multiAddress)) {
  301.             $this->multiAddress[] = $multiAddress;
  302.             $multiAddress->setSupplier($this);
  303.         }
  304.         return $this;
  305.     }
  306.     public function removeMultiAddress(Address $multiAddress): self
  307.     {
  308.         if ($this->multiAddress->removeElement($multiAddress)) {
  309.             // set the owning side to null (unless already changed)
  310.             if ($multiAddress->getSupplier() === $this) {
  311.                 $multiAddress->setSupplier(null);
  312.             }
  313.         }
  314.         return $this;
  315.     }
  316.     public function getType(): ?string
  317.     {
  318.         return $this->type;
  319.     }
  320.     public function setType(?string $type): self
  321.     {
  322.         $this->type $type;
  323.         return $this;
  324.     }
  325.     /**
  326.      * @return Collection|user[]
  327.      */
  328.     public function getContacts(): Collection
  329.     {
  330.         return $this->contacts;
  331.     }
  332.     public function addContact(user $contact): self
  333.     {
  334.         if (!$this->contacts->contains($contact)) {
  335.             $this->contacts[] = $contact;
  336.             $contact->setSupplier($this);
  337.         }
  338.         return $this;
  339.     }
  340.     public function removeContact(user $contact): self
  341.     {
  342.         if ($this->contacts->removeElement($contact)) {
  343.             // set the owning side to null (unless already changed)
  344.             if ($contact->getSupplier() === $this) {
  345.                 $contact->setSupplier(null);
  346.             }
  347.         }
  348.         return $this;
  349.     }
  350. }