src/IlaveU/ShopBundle/Entity/Vendor/Vendor.php line 27
<?phpnamespace App\IlaveU\ShopBundle\Entity\Vendor;use ApiPlatform\Core\Annotation\ApiResource;use App\Entity\User;use App\IlaveU\ShopBundle\Entity\Customer\Customer;use App\IlaveU\ShopBundle\Entity\Customer\CustomerGroup;use App\IlaveU\ShopBundle\Entity\Order\Order;use App\IlaveU\ShopBundle\Entity\Product\ImportExcel;use App\IlaveU\ShopBundle\Entity\Product\Product;use App\IlaveU\ShopBundle\Entity\Product\ProductShop;use App\IlaveU\ShopBundle\Entity\Shipping\CityRegion;use App\IlaveU\ShopBundle\Repository\VendorRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Vich\UploaderBundle\Mapping\Annotation as Vich;use Symfony\Component\HttpFoundation\File\File;use Symfony\Component\Validator\Constraints as Assert;/*** @Vich\Uploadable*/#[ApiResource]#[ORM\Entity(repositoryClass: VendorRepository::class)]class Vendor implements \Stringable{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: 'integer')]private $id;#[ORM\Column(type: 'string', length: 255)]private ?string $name = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $image = null;#[ORM\Column(type: 'datetime_immutable', nullable: true)]private ?\DateTimeImmutable $createdAt = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]#[Assert\Email]private ?string $email = null;#[ORM\OneToOne(targetEntity: User::class, cascade: ['persist', 'remove'])]#[ORM\JoinColumn(nullable: true)]private \App\Entity\User $user;#[ORM\Column(type: 'text', nullable: true)]private ?string $description = null;#[ORM\Column(type: 'boolean', nullable: true)]private ?bool $isValid = null;#[ORM\OneToMany(targetEntity: Product::class, mappedBy: 'vendor')]private \Doctrine\Common\Collections\Collection|array $products;#[ORM\Column(type: 'string', length: 255)]private ?string $fullName = null;#[ORM\Column(type: 'string', length: 255)]private ?string $tel = null;#[ORM\Column(type: 'string', length: 255)]private ?string $address = null;#[ORM\Column(type: 'string', length: 255)]private ?string $city = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $ICE = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $RC = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $simulateUsername = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $simulatePassword = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $coverImage = null;/*** @Vich\UploadableField(mapping="join_images", fileNameProperty="pathRCImage")*/private ?\Symfony\Component\HttpFoundation\File\File $imageRCFile = null;/*** @Vich\UploadableField(mapping="join_images", fileNameProperty="pathIceImage")*/private ?\Symfony\Component\HttpFoundation\File\File $imageIceFile = null;/*** @Vich\UploadableField(mapping="join_images", fileNameProperty="pathIFIMAGE")*/private ?\Symfony\Component\HttpFoundation\File\File $imageIFFile = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $pathRCImage = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $pathIceImage = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $pathIFImage = null;#[ORM\Column(type: 'string', length: 255, nullable: true)]private ?string $IdentifiantFiscale = null;#[ORM\OneToMany(targetEntity: ImportExcel::class, mappedBy: 'vendor')]private \Doctrine\Common\Collections\Collection|array $importExcels;#[ORM\OneToMany(targetEntity: Customer::class, mappedBy: 'vendor')]private \Doctrine\Common\Collections\Collection|array $customers;#[ORM\OneToMany(targetEntity: Order::class, mappedBy: 'vendor')]private \Doctrine\Common\Collections\Collection|array $orders;#[ORM\ManyToMany(targetEntity: CustomerGroup::class, inversedBy: 'vendors')]private Collection $customerGroups;#[ORM\ManyToMany(targetEntity: CityRegion::class, inversedBy: 'vendors')]private Collection $cityRegions;#[ORM\Column(length: 255, nullable: true)]private ?string $blindPassword = null;public function __toString(): string{return (string)$this->name;}public function __construct(){//$this->user = new User();$this->customerGroups = new ArrayCollection();$this->cityRegions = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getImage(): ?string{return $this->image;}public function setImage(?string $image): self{$this->image = $image;return $this;}public function getCreatedAt(): ?\DateTimeImmutable{return $this->createdAt;}public function setCreatedAt(?\DateTimeImmutable $createdAt): self{$this->createdAt = $createdAt;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): self{$this->email = $email;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(User $user): self{$this->user = $user;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getIsValid(): ?bool{return $this->isValid;}public function setIsValid(?bool $isValid): self{$this->isValid = $isValid;return $this;}/*** @return Collection|Product[]*/public function getProducts(): Collection{return $this->products;}public function addProduct(Product $product): self{if (!$this->products->contains($product)) {$this->products[] = $product;$product->setVendor($this);}return $this;}public function removeProduct(Product $product): self{if ($this->products->removeElement($product)) {// set the owning side to null (unless already changed)if ($product->getVendor() === $this) {$product->setVendor(null);}}return $this;}public function getFullName(): ?string{return $this->fullName;}public function setFullName(string $fullName): self{$this->fullName = $fullName;return $this;}public function getTel(): ?string{return $this->tel;}public function setTel(string $tel): self{$this->tel = $tel;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 getICE(): ?string{return $this->ICE;}public function setICE(string $ICE): self{$this->ICE = $ICE;return $this;}public function getRC(): ?string{return $this->RC;}public function setRC(string $RC): self{$this->RC = $RC;return $this;}public function getSimulateUsername(): ?string{return $this->simulateUsername;}public function setSimulateUsername(string $simulateUsername): self{$this->simulateUsername = $simulateUsername;return $this;}public function getSimulatePassword(): ?string{return $this->simulatePassword;}public function setSimulatePassword(string $simulatePassword): self{$this->simulatePassword = $simulatePassword;return $this;}public function getCoverImage(): ?string{return $this->coverImage;}public function setCoverImage(?string $coverImage): self{$this->coverImage = $coverImage;return $this;}public function setImageRCFile(File $path = null){$this->imageRCFile = $path;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lost}public function getImageRCFile(){return $this->imageRCFile;}public function setImageIceFile(File $path = null){$this->imageIceFile = $path;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lost}public function getImageIceFile(){return $this->imageIceFile;}public function setImageIFFile(File $path = null){$this->imageIFFile = $path;// VERY IMPORTANT:// It is required that at least one field changes if you are using Doctrine,// otherwise the event listeners won't be called and the file is lost}public function getImageIFFile(){return $this->imageIFFile;}public function getPathRCImage(): ?string{return $this->pathRCImage;}public function setPathRCImage(?string $pathRCImage): self{$this->pathRCImage = $pathRCImage;return $this;}public function getPathIceImage(): ?string{return $this->pathIceImage;}public function setPathIceImage(?string $pathIceImage): self{$this->pathIceImage = $pathIceImage;return $this;}public function getPathIFImage(): ?string{return $this->pathIFImage;}public function setPathIFImage(?string $pathIFImage): self{$this->pathIFImage = $pathIFImage;return $this;}public function getIdentifiantFiscale(): ?string{return $this->IdentifiantFiscale;}public function setIdentifiantFiscale(?string $IdentifiantFiscale): self{$this->IdentifiantFiscale = $IdentifiantFiscale;return $this;}/*** @return Collection<int, ImportExcel>*/public function getImportExcels(): Collection{return $this->importExcels;}public function addImportExcel(ImportExcel $importExcel): self{if (!$this->importExcels->contains($importExcel)) {$this->importExcels[] = $importExcel;$importExcel->setVendor($this);}return $this;}public function removeImportExcel(ImportExcel $importExcel): self{if ($this->importExcels->removeElement($importExcel)) {// set the owning side to null (unless already changed)if ($importExcel->getVendor() === $this) {$importExcel->setVendor(null);}}return $this;}/*** @return Collection<int, Customer>*/public function getCustomers(): Collection{return $this->customers;}public function addCustomer(Customer $customer): self{if (!$this->customers->contains($customer)) {$this->customers[] = $customer;$customer->setVendor($this);}return $this;}public function removeCustomer(Customer $customer): self{if ($this->customers->removeElement($customer)) {// set the owning side to null (unless already changed)if ($customer->getVendor() === $this) {$customer->setVendor(null);}}return $this;}/*** @return Collection<int, Order>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Order $order): self{if (!$this->orders->contains($order)) {$this->orders[] = $order;$order->setVendor($this);}return $this;}public function removeOrder(Order $order): self{if ($this->orders->removeElement($order)) {// set the owning side to null (unless already changed)if ($order->getVendor() === $this) {$order->setVendor(null);}}return $this;}/*** @return Collection<int, CustomerGroup>*/public function getCustomerGroups(): Collection{return $this->customerGroups;}public function addCustomerGroup(CustomerGroup $customerGroup): self{if (!$this->customerGroups->contains($customerGroup)) {$this->customerGroups->add($customerGroup);}return $this;}public function removeCustomerGroup(CustomerGroup $customerGroup): self{$this->customerGroups->removeElement($customerGroup);return $this;}/*** @return Collection<int, CityRegion>*/public function getCityRegions(): Collection{return $this->cityRegions;}public function addCityRegion(CityRegion $cityRegion): self{if (!$this->cityRegions->contains($cityRegion)) {$this->cityRegions->add($cityRegion);}return $this;}public function removeCityRegion(CityRegion $cityRegion): self{$this->cityRegions->removeElement($cityRegion);return $this;}public function getBlindPassword(): ?string{return $this->blindPassword;}public function setBlindPassword(?string $blindPassword): self{$this->blindPassword = $blindPassword;return $this;}}