src/Entity/Manufacturers.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ManufacturersRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassManufacturersRepository::class)]
  8. class Manufacturers
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $name;
  16.     #[ORM\Column(type'datetime')]
  17.     private $modified;
  18.     #[ORM\Column(type'datetime')]
  19.     private $created;
  20.     #[ORM\OneToMany(targetEntityProductManufacturers::class, mappedBy'manufacturers')]
  21.     private $productManufacturers;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $firstName;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $lastName;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private $email;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private $hashedEmail;
  30.     #[ORM\Column(type'string'length255nullabletrue)]
  31.     private $telephone;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private $isoCode;
  34.     #[ORM\Column(type'string'length255nullabletrue)]
  35.     private $intlCode;
  36.     #[ORM\OneToMany(targetEntityManufacturerUsers::class, mappedBy'manufacturer')]
  37.     private $manufacturerUsers;
  38.     #[ORM\Column(type'string'length255nullabletrue)]
  39.     private $logo;
  40.     #[ORM\Column(type'string'length255nullabletrue)]
  41.     private $domainName;
  42.     #[ORM\Column(type'string'length255nullabletrue)]
  43.     private $plainName;
  44.     public function __construct()
  45.     {
  46.         $this->setCreated(new \DateTime());
  47.         if ($this->getModified() == null) {
  48.             $this->setModified(new \DateTime());
  49.         }
  50.         $this->productManufacturers = new ArrayCollection();
  51.         $this->manufacturerUsers = new ArrayCollection();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getName(): ?string
  58.     {
  59.         return $this->name;
  60.     }
  61.     public function setName(string $name): self
  62.     {
  63.         $this->name $name;
  64.         return $this;
  65.     }
  66.     public function getModified(): ?\DateTimeInterface
  67.     {
  68.         return $this->modified;
  69.     }
  70.     public function setModified(\DateTimeInterface $modified): self
  71.     {
  72.         $this->modified $modified;
  73.         return $this;
  74.     }
  75.     public function getCreated(): ?\DateTimeInterface
  76.     {
  77.         return $this->created;
  78.     }
  79.     public function setCreated(\DateTimeInterface $created): self
  80.     {
  81.         $this->created $created;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection|Products[]
  86.      */
  87.     public function getProducts(): Collection
  88.     {
  89.         return $this->products;
  90.     }
  91.     public function addProducts(Products $products): self
  92.     {
  93.         if (!$this->products->contains($products)) {
  94.             $this->products[] = $products;
  95.         }
  96.         return $this;
  97.     }
  98.     public function removeProducts(Products $products): self
  99.     {
  100.         $this->products->removeElement($products);
  101.         return $this;
  102.     }
  103.     /**
  104.      * @return string
  105.      */
  106.     public function __toString(){
  107.         return $this->getName();
  108.     }
  109.     /**
  110.      * @return Collection<int, ProductManufacturers>
  111.      */
  112.     public function getProductManufacturers(): Collection
  113.     {
  114.         return $this->productManufacturers;
  115.     }
  116.     public function addProductManufacturer(ProductManufacturers $productManufacturer): self
  117.     {
  118.         if (!$this->productManufacturers->contains($productManufacturer)) {
  119.             $this->productManufacturers[] = $productManufacturer;
  120.             $productManufacturer->setManufacturers($this);
  121.         }
  122.         return $this;
  123.     }
  124.     public function removeProductManufacturer(ProductManufacturers $productManufacturer): self
  125.     {
  126.         if ($this->productManufacturers->removeElement($productManufacturer)) {
  127.             // set the owning side to null (unless already changed)
  128.             if ($productManufacturer->getManufacturers() === $this) {
  129.                 $productManufacturer->setManufacturers(null);
  130.             }
  131.         }
  132.         return $this;
  133.     }
  134.     public function getFirstName(): ?string
  135.     {
  136.         return $this->firstName;
  137.     }
  138.     public function setFirstName(string $firstName): self
  139.     {
  140.         $this->firstName $firstName;
  141.         return $this;
  142.     }
  143.     public function getLastName(): ?string
  144.     {
  145.         return $this->lastName;
  146.     }
  147.     public function setLastName(string $lastName): self
  148.     {
  149.         $this->lastName $lastName;
  150.         return $this;
  151.     }
  152.     public function getEmail(): ?string
  153.     {
  154.         return $this->email;
  155.     }
  156.     public function setEmail(string $email): self
  157.     {
  158.         $this->email $email;
  159.         return $this;
  160.     }
  161.     public function getHashedEmail(): ?string
  162.     {
  163.         return $this->hashedEmail;
  164.     }
  165.     public function setHashedEmail(string $hashedEmail): self
  166.     {
  167.         $this->hashedEmail $hashedEmail;
  168.         return $this;
  169.     }
  170.     public function getTelephone(): ?string
  171.     {
  172.         return $this->telephone;
  173.     }
  174.     public function setTelephone(string $telephone): self
  175.     {
  176.         $this->telephone $telephone;
  177.         return $this;
  178.     }
  179.     public function getIsoCode(): ?string
  180.     {
  181.         return $this->isoCode;
  182.     }
  183.     public function setIsoCode(string $isoCode): self
  184.     {
  185.         $this->isoCode $isoCode;
  186.         return $this;
  187.     }
  188.     public function getIntlCode(): ?string
  189.     {
  190.         return $this->intlCode;
  191.     }
  192.     public function setIntlCode(string $intlCode): self
  193.     {
  194.         $this->intlCode $intlCode;
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return Collection<int, ManufacturerUsers>
  199.      */
  200.     public function getManufacturerUsers(): Collection
  201.     {
  202.         return $this->manufacturerUsers;
  203.     }
  204.     public function addManufacturerUser(ManufacturerUsers $manufacturerUser): self
  205.     {
  206.         if (!$this->manufacturerUsers->contains($manufacturerUser)) {
  207.             $this->manufacturerUsers[] = $manufacturerUser;
  208.             $manufacturerUser->setManufacturer($this);
  209.         }
  210.         return $this;
  211.     }
  212.     public function removeManufacturerUser(ManufacturerUsers $manufacturerUser): self
  213.     {
  214.         if ($this->manufacturerUsers->removeElement($manufacturerUser)) {
  215.             // set the owning side to null (unless already changed)
  216.             if ($manufacturerUser->getManufacturer() === $this) {
  217.                 $manufacturerUser->setManufacturer(null);
  218.             }
  219.         }
  220.         return $this;
  221.     }
  222.     public function getLogo(): ?string
  223.     {
  224.         return $this->logo;
  225.     }
  226.     public function setLogo(?string $logo): self
  227.     {
  228.         $this->logo $logo;
  229.         return $this;
  230.     }
  231.     public function getDomainName(): ?string
  232.     {
  233.         return $this->domainName;
  234.     }
  235.     public function setDomainName(?string $domainName): self
  236.     {
  237.         $this->domainName $domainName;
  238.         return $this;
  239.     }
  240.     public function getPlainName(): ?string
  241.     {
  242.         return $this->plainName;
  243.     }
  244.     public function setPlainName(?string $plainName): self
  245.     {
  246.         $this->plainName $plainName;
  247.         return $this;
  248.     }
  249. }