src/Entity/ZaunelementMaterials.php line 16
<?phpnamespace App\Entity;use App\Repository\ZaunelementMaterialRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Symfony\Component\Serializer\Annotation\Groups;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: ZaunelementMaterialRepository::class)]#[Vich\Uploadable]class ZaunelementMaterials{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: "integer")]private $id;#[ORM\ManyToOne(targetEntity: Zaunelement::class, inversedBy: "zaunelementMaterials")]#[ORM\JoinColumn(nullable: true, onDelete: "CASCADE")]private $zaunelement_id;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $article_number;#[ORM\Column(type: "float", nullable: true)]#[Groups(["products"])]private $price;#[ORM\ManyToOne(targetEntity: Material::class)]#[Groups(["products"])]private $material_id;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $thumbnail;#[Vich\UploadableField(mapping: "product_images", fileNameProperty: "thumbnail")]private $thumbnailFile;#[ORM\Column(type: "datetime_immutable", nullable: true)]#[Groups(["products"])]private $updated_at;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $title;#[ORM\ManyToOne(targetEntity: Material::class)]#[Groups(["products"])]private $secondary_material_id;#[ORM\Column(type: "float", nullable: true)]private $seller_price;#[ORM\OneToMany(targetEntity: Zaunelement::class, mappedBy: "defaultMaterialCombination")]private $zaunelement;#[ORM\Column(type: "string", length: 255, nullable: true)]#[Groups(["products"])]private $article_number_l;#[ORM\Column(length: 255, nullable: true)]#[Groups(["products"])]private ?string $articleNumberSpecialSizeR = null;#[ORM\Column(length: 255, nullable: true)]#[Groups(["products"])]private ?string $articleNumberSpecialSizeL = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]#[Groups(["products"])]private ?string $priceSpecialSize = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]#[Groups(["products"])]private ?string $sellerPriceSpecialSize = null;public function __construct(){$this->zaunelement = new ArrayCollection();}public function __toString(){return $this->title ?? '';}public function getId(): ?int{return $this->id;}public function getZaunelementId(): ?Zaunelement{return $this->zaunelement_id;}public function setZaunelementId(?Zaunelement $zaunelement_id): self{$this->zaunelement_id = $zaunelement_id;return $this;}public function getArticleNumber(): ?string{return $this->article_number;}public function setArticleNumber(?string $article_number): self{$this->article_number = $article_number;return $this;}public function getPrice(): ?float{return $this->price;}public function setPrice(?float $price): self{$this->price = $price;return $this;}public function getMaterialId(): ?Material{return $this->material_id;}public function setMaterialId(?Material $material_id): self{$this->material_id = $material_id;return $this;}public function getThumbnail(): ?string{return $this->thumbnail;}public function setThumbnail(?string $thumbnail): self{$this->thumbnail = $thumbnail;return $this;}/*** @param null|File $image*/public function setThumbnailFile(File $image = null){$this->thumbnailFile = $image;// 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 lostif ($image) {// if 'updatedAt' is not defined in your entity, use another property$this->updated_at = new \DateTimeImmutable('now');}}/*** @return null|File*/public function getThumbnailFile(): ?File{return $this->thumbnailFile;}public function getUpdatedAt(): ?\DateTimeImmutable{return $this->updated_at;}public function setUpdatedAt(?\DateTimeImmutable $updated_at): self{$this->updated_at = $updated_at;return $this;}public function getTitle(): ?string{return $this->title;}public function setTitle(?string $title): self{$this->title = $title;return $this;}public function getSecondaryMaterialId(): ?Material{return $this->secondary_material_id;}public function setSecondaryMaterialId(?Material $secondary_material_id): self{$this->secondary_material_id = $secondary_material_id;return $this;}public function getSellerPrice(): ?float{return $this->seller_price;}public function setSellerPrice(?float $seller_price): self{$this->seller_price = $seller_price;return $this;}/*** @return Collection|Zaunelement[]*/public function getZaunelement(): Collection|array{return $this->zaunelement;}public function addZaunelement(Zaunelement $zaunelement): self{if (!$this->zaunelement->contains($zaunelement)) {$this->zaunelement[] = $zaunelement;$zaunelement->setDefaultMaterialCombination($this);}return $this;}public function removeZaunelement(Zaunelement $zaunelement): self{if ($this->zaunelement->removeElement($zaunelement)) {// set the owning side to null (unless already changed)if ($zaunelement->getDefaultMaterialCombination() === $this) {$zaunelement->setDefaultMaterialCombination(null);}}return $this;}public function getArticleNumberL(): ?string{return $this->article_number_l;}public function setArticleNumberL(?string $article_number_l): self{$this->article_number_l = $article_number_l;return $this;}public function getArticleNumberSpecialSizeR(): ?string{return $this->articleNumberSpecialSizeR;}public function setArticleNumberSpecialSizeR(?string $articleNumberSpecialSizeR): static{$this->articleNumberSpecialSizeR = $articleNumberSpecialSizeR;return $this;}public function getArticleNumberSpecialSizeL(): ?string{return $this->articleNumberSpecialSizeL;}public function setArticleNumberSpecialSizeL(?string $articleNumberSpecialSizeL): static{$this->articleNumberSpecialSizeL = $articleNumberSpecialSizeL;return $this;}public function getPriceSpecialSize(): ?string{return $this->priceSpecialSize;}public function setPriceSpecialSize(?string $priceSpecialSize): static{$this->priceSpecialSize = $priceSpecialSize;return $this;}public function getSellerPriceSpecialSize(): ?string{return $this->sellerPriceSpecialSize;}public function setSellerPriceSpecialSize(?string $sellerPriceSpecialSize): static{$this->sellerPriceSpecialSize = $sellerPriceSpecialSize;return $this;}}