<?php
namespace App\Entity\Gos;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Validator\Constraints as Assert;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* CountrySettings
*
* @ORM\Table(name="country_settings")
* @ORM\Entity(repositoryClass="App\Repository\CountrySettingsRepository")
* @Vich\Uploadable()
* @ORM\HasLifecycleCallbacks
*/
class CountrySettings
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var bool
*
* @ORM\Column(name="isActive", type="boolean")
*/
private $isActive;
/**
* @var bool
*
* @ORM\Column(name="euMember", type="boolean")
*/
private $euMember;
/**
* @var string
*
* @ORM\Column(name="signBeforePrice", type="string", length=255, nullable=true)
*/
private $signBeforePrice;
/**
* @var string
*
* @ORM\Column(name="signAfterPrice", type="string", length=255, nullable=true)
*/
private $signAfterPrice;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $priceCurrency;
/**
* @ORM\Column(type="smallint", nullable=true)
*/
private $vatRateB2b;
/**
* @ORM\Column(type="smallint", nullable=true)
*/
private $vatRateB2c;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $paymentMethodOnlineDescription;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $paymentMethodOfflineDescription;
/**
* @var string
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $linkToPaymentInstructions;
/**
* @ORM\OneToOne(targetEntity="Country", inversedBy="countrySettings")
* @ORM\JoinColumn()
*/
private $country;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $braintreeMerchant;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @var string
*
* @ORM\Column(type="string", nullable=true)
*/
private $onlinePaymentLabel;
/**
* @Vich\UploadableField(mapping="country_logo", fileNameProperty="logoFilename")
*/
private $logo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $logoFilename;
/** @ORM\PrePersist() */
public function prePersist()
{
$this->createdAt = new \DateTime();
}
/** @ORM\PreUpdate() */
public function preUpdate()
{
$this->updatedAt = new \DateTime();
}
public function __toString()
{
return (string)'settings '.$this->country;
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set isActive
*
* @param boolean $isActive
*
* @return CountrySettings
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Get isActive
*
* @return bool
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* Set euMember
*
* @param boolean $euMember
*
* @return CountrySettings
*/
public function setEuMember($euMember)
{
$this->euMember = $euMember;
return $this;
}
/**
* Get euMember
*
* @return bool
*/
public function getEuMember()
{
return $this->euMember;
}
/**
* Set signBeforePrice
*
* @param string $signBeforePrice
*
* @return CountrySettings
*/
public function setSignBeforePrice($signBeforePrice)
{
$this->signBeforePrice = $signBeforePrice;
return $this;
}
/**
* Get signBeforePrice
*
* @return string
*/
public function getSignBeforePrice()
{
return $this->signBeforePrice;
}
/**
* Set signAfterPrice
*
* @param string $signAfterPrice
*
* @return CountrySettings
*/
public function setSignAfterPrice($signAfterPrice)
{
$this->signAfterPrice = $signAfterPrice;
return $this;
}
/**
* Get signAfterPrice
*
* @return string
*/
public function getSignAfterPrice()
{
return $this->signAfterPrice;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
*
* @return CountrySettings
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
*
* @return CountrySettings
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set country
*
* @param Country $country
*
* @return CountrySettings
*/
public function setCountry(Country $country = null)
{
$this->country = $country;
return $this;
}
/**
* Get country
*
* @return Country
*/
public function getCountry()
{
return $this->country;
}
/**
* Set vatRateB2b
*
* @param integer $vatRateB2b
*
* @return CountrySettings
*/
public function setVatRateB2b($vatRateB2b)
{
$this->vatRateB2b = $vatRateB2b;
return $this;
}
/**
* Get vatRateB2b
*
* @return integer
*/
public function getVatRateB2b()
{
return $this->vatRateB2b;
}
/**
* Set vatRateB2c
*
* @param integer $vatRateB2c
*
* @return CountrySettings
*/
public function setVatRateB2c($vatRateB2c)
{
$this->vatRateB2c = $vatRateB2c;
return $this;
}
/**
* Get vatRateB2c
*
* @return integer
*/
public function getVatRateB2c()
{
return $this->vatRateB2c;
}
/**
* Set priceCurrency
*
* @param string $priceCurrency
*
* @return CountrySettings
*/
public function setPriceCurrency($priceCurrency)
{
$this->priceCurrency = $priceCurrency;
return $this;
}
/**
* Get priceCurrency
*
* @return string
*/
public function getPriceCurrency()
{
return $this->priceCurrency;
}
/**
* Set onlinePaymentLabel
*
* @param string $paymentLabel
*
* @return CountrySettings
*/
public function setOnlinePaymentLabel($onlinePaymentLabel)
{
$this->onlinePaymentLabel = $onlinePaymentLabel;
return $this;
}
/**
* Get onlinePaymentLabel
*
* @return string
*/
public function getOnlinePaymentLabel()
{
return $this->onlinePaymentLabel;
}
/**
* Set paymentMethodOnlineDescription
*
* @param string $paymentMethodOnlineDescription
*
* @return CountrySettings
*/
public function setPaymentMethodOnlineDescription($paymentMethodOnlineDescription)
{
$this->paymentMethodOnlineDescription = $paymentMethodOnlineDescription;
return $this;
}
/**
* Get paymentMethodOnlineDescription
*
* @return string
*/
public function getPaymentMethodOnlineDescription()
{
return $this->paymentMethodOnlineDescription;
}
/**
* Set paymentMethodOfflineDescription
*
* @param string $paymentMethodOfflineDescription
*
* @return CountrySettings
*/
public function setPaymentMethodOfflineDescription($paymentMethodOfflineDescription)
{
$this->paymentMethodOfflineDescription = $paymentMethodOfflineDescription;
return $this;
}
/**
* Get paymentMethodOfflineDescription
*
* @return string
*/
public function getPaymentMethodOfflineDescription()
{
return $this->paymentMethodOfflineDescription;
}
/**
* Set linkToPaymentInstructions
*
* @param string $linkToPaymentInstructions
*
* @return CountrySettings
*/
public function setLinkToPaymentInstructions($linkToPaymentInstructions)
{
$this->linkToPaymentInstructions = $linkToPaymentInstructions;
return $this;
}
/**
* Get linkToPaymentInstructions
*
* @return string
*/
public function getLinkToPaymentInstructions()
{
return $this->linkToPaymentInstructions;
}
/**
* Set braintreeMerchant
*
* @param string $braintreeMerchant
*
* @return CountrySettings
*/
public function setBraintreeMerchant($braintreeMerchant)
{
$this->braintreeMerchant = $braintreeMerchant;
return $this;
}
/**
* Get braintreeMerchant
*
* @return string
*/
public function getBraintreeMerchant()
{
return $this->braintreeMerchant;
}
public function setLogo(?File $logo = null): void
{
$this->logo = $logo;
if ($logo !== null)
{
$this->updatedAt = new \DateTimeImmutable();
}
}
public function getLogo(): ?File
{
return $this->logo;
}
public function getLogoFilename(): ?string
{
return $this->logoFilename;
}
public function setLogoFilename(?string $logoFilename): self
{
$this->logoFilename = $logoFilename;
return $this;
}
}