<?php
namespace App\Entity;
use App\Entity\File\File;
use App\Entity\File\Photo;
use App\Entity\File\ProductFile;
use App\Entity\File\Template;
use App\Entity\File\ValuableFile;
use App\Entity\File\ValuableProtocolFile;
use App\Helper\EnumsHelper;
use App\Repository\ProductRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProductRepository::class)
* @ORM\HasLifecycleCallbacks
*/
class Product extends AbstractEntity
{
const MASK_GENERATOR_SIGNI = 1;
const MASK_GENERATOR_PDF = 2;
const MASK_GENERATOR_RAYNET = 4;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="float")
*/
private $price;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $tax;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notes;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="company")
*/
private $orders;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="products")
*/
private $company;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $interest;
/**
* @ORM\OneToOne(targetEntity=File::class)
*/
private $template;
/**
* @ORM\Column(type="string", length=255)
*/
private $token;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $xApiToken;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="boolean", name="generatorSigni")
*/
private $generatorSigni = false;
/**
* @ORM\Column(type="string", length=2, nullable=true)
*/
private $signiLocale;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $signiEmail;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $signiContractRole;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $signiProposers;
/**
* @ORM\Column(type="string", length=64, nullable=true)
*/
private $signiSigningOrder;
/**
* @ORM\Column(type="string", length=16)
*/
private $productType = EnumsHelper::PRODUCT_TYPE_BOND;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dueDate;
/**
* @ORM\Column(type="boolean")
*/
private $generatorPdf = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $allowNotificationChange = false;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $allowNotificationChangeEmails;
/**
* @ORM\Column(type="boolean")
*/
private $generatorRaynet = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $raynetInstance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $raynetUsername;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $raynetPassword;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $webHeader;
/**
* @ORM\Column(type="string", length=500, nullable=true)
*/
private $webDesc;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $webParams;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $webCompany;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $webFiles;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $webLink;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $webOrder = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $active;
/**
* @ORM\Column(type="integer")
*/
private $minCount = 1;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $currency;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $priceSecondary;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $digiSignAccessKey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $digiSignSecretKey;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $generatorDigiSign;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $digiSignBranding;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $reward;
/**
* @ORM\OneToMany(targetEntity=ProductParameter::class, mappedBy="product", cascade={"persist", "remove"})
*/
private $productParameters;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $vat;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $material;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $margin;
/**
* @ORM\ManyToMany(targetEntity=Product::class)
*/
private $related;
/**
* @ORM\Column(type="string", length=500, nullable=true)
*/
private $shortDesc;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $longDesc;
/**
* Dynamicke parametry produktu
*
* @var array
*/
private $addsOnParams = [];
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $useGoldAndSilver;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $goldAndSilverKey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $goldAndSilverProductId;
/**
* @ORM\OneToMany(targetEntity=File::class, mappedBy="metal", cascade={"persist"})
*/
private $photos;
/**
* @ORM\OneToOne(targetEntity=Photo::class, cascade={"persist", "remove"})
*/
private $primaryPhoto;
/**
* @ORM\OneToOne(targetEntity=Template::class, inversedBy="product", cascade={"persist", "remove"})
*/
private $templateValuablePaper;
/**
* @ORM\OneToOne(targetEntity=Template::class, inversedBy="product", cascade={"persist", "remove"})
*/
private $templateValuablePaperMulti;
/**
* @ORM\OneToOne(targetEntity=Template::class, inversedBy="product", cascade={"persist", "remove"})
*/
private $templateValuablePaperProtocol;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $vpProtocolNotification;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $vpProtocolNotificationDelay;
/**
* @ORM\OneToMany(targetEntity=InterestPaidoffReport::class, mappedBy="product")
*/
private $interestPaidoffReports;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $useAdamna;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adamnaApi;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adamnaToken;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adamnaIdentifier;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adamnaUserId;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $invoicePaymentsPeriod;
/**
* @ORM\Column(type="datetime", nullable=true, name="invoice_payments_pvv")
*/
private $invoicePaymentsPvv;
/**
* @ORM\OneToMany(targetEntity=ProductFile::class, mappedBy="product", cascade={"persist", "remove"})
* @ORM\OrderBy({"sortOrder" = "ASC"})
*/
private $productFiles;
public function __construct()
{
$this->orders = new ArrayCollection();
$this->productParameters = new ArrayCollection();
$this->related = new ArrayCollection();
$this->photos = new ArrayCollection();
$this->interestPaidoffReports = new ArrayCollection();
$this->productFiles = new ArrayCollection();
}
/**
* @return string (ID:{$this->getId()}) {$this->getName()}
*/
public function __toString(): string
{
return "(ID:{$this->getId()}) {$this->getName()}";
}
/**
* Add token
*
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function onPrePersist()
{
parent::onPrePersist();
if (is_null($this->token) || $this->token == '') {
$this->setToken(sha1(md5(rand(0, 9999999).rand(0, 9999999))));
}
}
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = (string)$name;
return $this;
}
public function getPrice(): ?float
{
return $this->price;
}
public function setPrice(?float $price): self
{
$price = str_replace(',', '.', (float)$price);
$this->price = $price;
return $this;
}
public function getTax(): ?float
{
return $this->tax;
}
public function setTax(?float $tax): self
{
$tax = str_replace(',', '.', (float)$tax);
$this->tax = $tax;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrders(Order $orders): self
{
if (!$this->orders->contains($orders)) {
$this->orders[] = $orders;
$orders->addProduct($this);
}
return $this;
}
public function removeOrders(Order $orders): self
{
if ($this->orders->removeElement($orders)) {
$orders->removeProduct($this);
}
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getInterest(): ?float
{
return $this->interest;
}
public function setInterest(float $interest): self
{
$interest = str_replace(',', '.', $interest);
$this->interest = $interest;
return $this;
}
public function getTemplate(): ?Template
{
return $this->template;
}
public function setTemplate(?Template $template): self
{
$this->template = $template;
$template->setProduct($this);
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(string $token): self
{
$this->token = $token;
return $this;
}
public function getXApiToken(): ?string
{
return $this->xApiToken;
}
public function setXApiToken(?string $xApiToken): self
{
$this->xApiToken = $xApiToken;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getSigniLocale(): ?string
{
return $this->signiLocale;
}
public function setSigniLocale(?string $signiLocale): self
{
$this->signiLocale = $signiLocale;
return $this;
}
public function getSigniEmail(): ?string
{
return $this->signiEmail;
}
public function setSigniEmail(?string $signiEmail): self
{
$this->signiEmail = $signiEmail;
return $this;
}
public function getSigniContractRole(): ?string
{
return $this->signiContractRole;
}
public function setSigniContractRole(?string $signiContractRole): self
{
$this->signiContractRole = $signiContractRole;
return $this;
}
public function getSigniProposers(): ?string
{
return $this->signiProposers;
}
public function setSigniProposers(?string $signiProposers): self
{
$this->signiProposers = $signiProposers;
return $this;
}
public function getSigniSigningOrder(): ?string
{
return $this->signiSigningOrder;
}
public function setSigniSigningOrder(?string $signiSigningOrder): self
{
$this->signiSigningOrder = $signiSigningOrder;
return $this;
}
public function getProductType(): ?string
{
return $this->productType;
}
public function setProductType(string $productType): self
{
$this->productType = $productType;
return $this;
}
public function getDueDate(): ?\DateTimeInterface
{
return $this->dueDate;
}
public function setDueDate(?\DateTimeInterface $dueDate): self
{
$this->dueDate = $dueDate;
return $this;
}
public function isGeneratorSigni(): ?bool
{
return (boolean)$this->generatorSigni;
}
public function setGeneratorSigni(bool $generatorSigni): self
{
$this->generatorSigni = $generatorSigni;
return $this;
}
public function isGeneratorPdf(): ?bool
{
return (boolean)$this->generatorPdf;
}
public function setGeneratorPdf(bool $generatorPdf): self
{
$this->generatorPdf = $generatorPdf;
return $this;
}
public function isGeneratorRaynet(): ?bool
{
return (boolean)$this->generatorRaynet;
}
public function setGeneratorRaynet(bool $generatorRaynet): self
{
$this->generatorRaynet = $generatorRaynet;
return $this;
}
public function getRaynetInstance(): ?string
{
return $this->raynetInstance;
}
public function setRaynetInstance(?string $raynetInstance): self
{
$this->raynetInstance = $raynetInstance;
return $this;
}
public function getRaynetUsername(): ?string
{
return $this->raynetUsername;
}
public function setRaynetUsername(?string $raynetUsername): self
{
$this->raynetUsername = $raynetUsername;
return $this;
}
public function getRaynetPassword(): ?string
{
return $this->raynetPassword;
}
public function setRaynetPassword(?string $raynetPassword): self
{
$this->raynetPassword = $raynetPassword;
return $this;
}
public function getWebHeader(): ?string
{
return $this->webHeader;
}
public function setWebHeader(?string $webHeader): self
{
$this->webHeader = $webHeader;
return $this;
}
public function getWebDesc(): ?string
{
return $this->webDesc;
}
public function setWebDesc(?string $webDesc): self
{
$this->webDesc = $webDesc;
return $this;
}
public function getWebParams(): ?string
{
return $this->webParams;
}
public function setWebParams(?string $webParams): self
{
$this->webParams = $webParams;
return $this;
}
public function getWebCompany(): ?string
{
return $this->webCompany;
}
public function setWebCompany(?string $webCompany): self
{
$this->webCompany = $webCompany;
return $this;
}
public function getWebLink(): ?string
{
return $this->webLink;
}
public function setWebLink(?string $webLink): self
{
$this->webLink = $webLink;
return $this;
}
public function getWebFiles(): ?string
{
return $this->webFiles;
}
public function setWebFiles(?string $webFiles): self
{
$this->webFiles = $webFiles;
return $this;
}
public function getWebOrder(): ?int
{
return $this->webOrder;
}
public function setWebOrder(?int $webOrder): self
{
$this->webOrder = $webOrder;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
public function getMinCount(): ?int
{
return (int)$this->minCount;
}
public function setMinCount(int $minCount): self
{
$this->minCount = $minCount;
return $this;
}
public function getCurrency(): ?string
{
return $this->currency;
}
public function setCurrency(?string $currency): self
{
$this->currency = $currency;
return $this;
}
public function getPriceSecondary(): ?float
{
return $this->priceSecondary;
}
public function setPriceSecondary(?float $priceSecondary): self
{
$this->priceSecondary = $priceSecondary;
return $this;
}
public function isAllowNotificationChange(): ?bool
{
return $this->allowNotificationChange;
}
public function setAllowNotificationChange(?bool $allowNotificationChange): self
{
$this->allowNotificationChange = $allowNotificationChange;
return $this;
}
public function getAllowNotificationChangeEmails(): ?string
{
return $this->allowNotificationChangeEmails;
}
public function setAllowNotificationChangeEmails(?string $allowNotificationChangeEmails): self
{
$this->allowNotificationChangeEmails = $allowNotificationChangeEmails;
return $this;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders->add($order);
$order->setCompany($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->getCompany() === $this) {
$order->setCompany(null);
}
}
return $this;
}
public function getDigiSignAccessKey(): ?string
{
return $this->digiSignAccessKey;
}
public function setDigiSignAccessKey(?string $digiSignAccessKey): self
{
$this->digiSignAccessKey = $digiSignAccessKey;
return $this;
}
public function getDigiSignSecretKey(): ?string
{
return $this->digiSignSecretKey;
}
public function setDigiSignSecretKey(?string $digiSignSecretKey): self
{
$this->digiSignSecretKey = $digiSignSecretKey;
return $this;
}
public function isGeneratorDigiSign(): ?bool
{
return $this->generatorDigiSign;
}
public function setGeneratorDigiSign(?bool $generatorDigiSign): self
{
$this->generatorDigiSign = $generatorDigiSign;
return $this;
}
public function getDigiSignBranding(): ?string
{
return $this->digiSignBranding;
}
public function setDigiSignBranding(?string $digiSignBranding): self
{
$this->digiSignBranding = $digiSignBranding;
return $this;
}
public function getReward(): ?float
{
return $this->reward;
}
public function setReward(?float $reward): self
{
$this->reward = $reward;
return $this;
}
/**
* @return Collection<int, ProductParameter>
*/
public function getProductParameters(): Collection
{
return $this->productParameters;
}
public function addProductParameter(ProductParameter $addProductParameter): self
{
$code = $addProductParameter->getParameter()->getCode();
/** @var Collection $productParameterEnt */
$productParameterEnts = $this->productParameters->filter(function(ProductParameter $productParameter) use ($code){
return $productParameter->getParameter()->getCode() == $code;
});
if(count($productParameterEnts) == 0){
$this->productParameters[] = $addProductParameter;
$addProductParameter->setProduct($this);
}
return $this;
}
public function removeProductParameter(ProductParameter $productParameter): self
{
if ($this->productParameters->removeElement($productParameter)) {
// set the owning side to null (unless already changed)
if ($productParameter->getProduct() === $this) {
$productParameter->setProduct(null);
}
}
return $this;
}
public function getVat(): ?float
{
return $this->vat;
}
public function setVat(?float $vat): self
{
$this->vat = $vat;
return $this;
}
public function getMaterial(): ?string
{
return $this->material;
}
public function setMaterial(?string $material): self
{
$this->material = $material;
return $this;
}
public function getMargin(): ?float
{
return $this->margin;
}
public function setMargin(?float $margin): self
{
$this->margin = $margin;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getRelated(): Collection
{
return $this->related;
}
public function addRelated(self $related): self
{
if (!$this->related->contains($related)) {
$this->related[] = $related;
}
return $this;
}
public function removeRelated(self $related): self
{
$this->related->removeElement($related);
return $this;
}
public function getShortDesc(): ?string
{
return $this->shortDesc;
}
public function setShortDesc(?string $shortDesc): self
{
$this->shortDesc = $shortDesc;
return $this;
}
public function getLongDesc(): ?string
{
return $this->longDesc;
}
public function setLongDesc(?string $longDesc): self
{
$this->longDesc = $longDesc;
return $this;
}
/**
* is triggered when invoking inaccessible methods in an object context.
*
* @param string $name
* @param array $arguments
* @return mixed
* @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
*/
public function __call(string $name, array $arguments)
{
/** @var Collection $productParameterEnt */
$productParameterEnts = $this->productParameters->filter(function(ProductParameter $productParameter) use ($name){
return $productParameter->getParameter()->getCode() == $name;
});
if(count($productParameterEnts) > 0){
return $productParameterEnts->first();
}
return null;
}
public function __get($name) {
if (!property_exists($this, $name) && !method_exists($this, $name)) {
/** @var Collection $productParameterEnt */
$productParameterEnts = $this->productParameters->filter(function(ProductParameter $productParameter) use ($name){
return $productParameter->getParameter()->getCode() == $name;
});
if(count($productParameterEnts) > 0){
return $productParameterEnts->first();
}
}
return null;
}
public function __set($name, $value) {
if (!property_exists($this, $name) && !method_exists($this, $name)) {
/** @var Collection $productParameterEnt */
$productParameterEnts = $this->productParameters->filter(function(ProductParameter $productParameter) use ($name){
return $productParameter->getParameter()->getCode() == $name;
});
if(count($productParameterEnts) > 0){
/** @var ProductParameter $productParameter */
$productParameter = $productParameterEnts->first();
$productParameter->setValue($value);
return $this;
}
}
}
public function isUseGoldAndSilver(): ?bool
{
return (bool)$this->useGoldAndSilver;
}
public function setUseGoldAndSilver(?bool $useGoldAndSilver): self
{
$this->useGoldAndSilver = $useGoldAndSilver;
return $this;
}
public function getGoldAndSilverKey(): ?string
{
return $this->goldAndSilverKey;
}
public function setGoldAndSilverKey(?string $goldAndSilverKey): self
{
$this->goldAndSilverKey = $goldAndSilverKey;
return $this;
}
public function getGoldAndSilverProductId(): ?string
{
return $this->goldAndSilverProductId;
}
public function setGoldAndSilverProductId(?string $goldAndSilverProductId): self
{
$this->goldAndSilverProductId = $goldAndSilverProductId;
return $this;
}
/**
* @return Collection<int, File>
*/
public function getPhotos(): Collection
{
return $this->photos;
}
public function addPhoto(File $photo): self
{
if (!$this->photos->contains($photo)) {
$this->photos[] = $photo;
$photo->setMetal($this);
}
return $this;
}
public function removePhoto(File $photo): self
{
if ($this->photos->removeElement($photo)) {
// set the owning side to null (unless already changed)
if ($photo->getMetal() === $this) {
$photo->setMetal(null);
}
}
return $this;
}
/**
* Vraci hlavni fotku, kdyz neni, tak beru prvni ze vsech fotek v poradi
*
* @return Photo|null
*/
public function getPrimaryPhoto(): ?Photo
{
if(isset($this->primaryPhoto)){
return $this->primaryPhoto;
}
if(count($this->photos) > 0){
return $this->photos->first();
}
return $this->primaryPhoto;
}
public function setPrimaryPhoto(?Photo $primaryPhoto): self
{
$this->primaryPhoto = $primaryPhoto;
return $this;
}
public function getTemplateValuablePaper(): ?Template
{
return $this->templateValuablePaper;
}
public function setTemplateValuablePaper(?Template $templateValuablePaper): self
{
$this->templateValuablePaper = $templateValuablePaper;
return $this;
}
public function getTemplateValuablePaperMulti(): ?Template
{
return $this->templateValuablePaperMulti;
}
public function setTemplateValuablePaperMulti(?Template $templateValuablePaperMulti): self
{
$this->templateValuablePaperMulti = $templateValuablePaperMulti;
return $this;
}
public function getTemplateValuablePaperProtocol(): ?Template
{
return $this->templateValuablePaperProtocol;
}
public function setTemplateValuablePaperProtocol(?Template $templateValuablePaperProtocol): self
{
$this->templateValuablePaperProtocol = $templateValuablePaperProtocol;
return $this;
}
public function isVpProtocolNotification(): ?bool
{
return $this->vpProtocolNotification;
}
public function setVpProtocolNotification(?bool $vpProtocolNotification): self
{
$this->vpProtocolNotification = $vpProtocolNotification;
return $this;
}
public function getVpProtocolNotificationDelay(): ?int
{
return $this->vpProtocolNotificationDelay;
}
public function setVpProtocolNotificationDelay(?int $vpProtocolNotificationDelay): self
{
$this->vpProtocolNotificationDelay = $vpProtocolNotificationDelay;
return $this;
}
/**
* @return Collection<int, InterestPaidoffReport>
*/
public function getInterestPaidoffReports(): Collection
{
return $this->interestPaidoffReports;
}
public function addInterestPaidoffReport(InterestPaidoffReport $interestPaidoffReport): self
{
if (!$this->interestPaidoffReports->contains($interestPaidoffReport)) {
$this->interestPaidoffReports[] = $interestPaidoffReport;
$interestPaidoffReport->setProduct($this);
}
return $this;
}
public function removeInterestPaidoffReport(InterestPaidoffReport $interestPaidoffReport): self
{
if ($this->interestPaidoffReports->removeElement($interestPaidoffReport)) {
// set the owning side to null (unless already changed)
if ($interestPaidoffReport->getProduct() === $this) {
$interestPaidoffReport->setProduct(null);
}
}
return $this;
}
public function isUseAdamna(): ?bool
{
return (boolean)$this->useAdamna;
}
public function setUseAdamna(?bool $useAdamna): self
{
$this->useAdamna = $useAdamna;
return $this;
}
public function getAdamnaApi(): ?string
{
return $this->adamnaApi;
}
public function setAdamnaApi(?string $adamnaApi): self
{
$this->adamnaApi = $adamnaApi;
return $this;
}
public function getAdamnaToken(): ?string
{
return $this->adamnaToken;
}
public function setAdamnaToken(?string $adamnaToken): self
{
$this->adamnaToken = $adamnaToken;
return $this;
}
public function getAdamnaIdentifier(): ?string
{
return $this->adamnaIdentifier;
}
public function setAdamnaIdentifier(?string $adamnaIdentifier): self
{
$this->adamnaIdentifier = $adamnaIdentifier;
return $this;
}
public function getAdamnaUserId(): ?string
{
return $this->adamnaUserId;
}
public function setAdamnaUserId(?string $adamnaUserId): self
{
$this->adamnaUserId = $adamnaUserId;
return $this;
}
public function getInvoicePaymentsPeriod(): ?int
{
return $this->invoicePaymentsPeriod;
}
public function setInvoicePaymentsPeriod(?int $invoicePaymentsPeriod): self
{
$this->invoicePaymentsPeriod = $invoicePaymentsPeriod;
return $this;
}
public function getInvoicePaymentsPvv(): ?\DateTimeInterface
{
return $this->invoicePaymentsPvv;
}
public function setInvoicePaymentsPvv(?\DateTimeInterface $invoicePaymentsPvv): self
{
$this->invoicePaymentsPvv = $invoicePaymentsPvv;
return $this;
}
/**
* @return Collection<int, ProductFile>
*/
public function getProductFiles(): Collection
{
return $this->productFiles;
}
public function addProductFile(ProductFile $productFile): self
{
if (!$this->productFiles->contains($productFile)) {
$this->productFiles[] = $productFile;
$productFile->setProduct($this);
}
return $this;
}
public function removeProductFile(ProductFile $productFile): self
{
if ($this->productFiles->removeElement($productFile)) {
// set the owning side to null (unless already changed)
if ($productFile->getProduct() === $this) {
$productFile->setProduct(null);
}
}
return $this;
}
}