src/Entity/Gos/CountrySettings.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. /**
  9.  * CountrySettings
  10.  *
  11.  * @ORM\Table(name="country_settings")
  12.  * @ORM\Entity(repositoryClass="App\Repository\CountrySettingsRepository")
  13.  * @Vich\Uploadable()
  14.  * @ORM\HasLifecycleCallbacks
  15.  */
  16. class CountrySettings
  17. {
  18.     /**
  19.      * @var int
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var bool
  28.      *
  29.      * @ORM\Column(name="isActive", type="boolean")
  30.      */
  31.     private $isActive;
  32.     /**
  33.      * @var bool
  34.      *
  35.      * @ORM\Column(name="euMember", type="boolean")
  36.      */
  37.     private $euMember;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="signBeforePrice", type="string", length=255, nullable=true)
  42.      */
  43.     private $signBeforePrice;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="signAfterPrice", type="string", length=255, nullable=true)
  48.      */
  49.     private $signAfterPrice;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $priceCurrency;
  56.     /**
  57.      * @ORM\Column(type="smallint", nullable=true)
  58.      */
  59.     private $vatRateB2b;
  60.     /**
  61.      * @ORM\Column(type="smallint", nullable=true)
  62.      */
  63.     private $vatRateB2c;
  64.     /**
  65.      * @ORM\Column(type="text", nullable=true)
  66.      */
  67.     private $paymentMethodOnlineDescription;
  68.     /**
  69.      * @ORM\Column(type="text", nullable=true)
  70.      */
  71.     private $paymentMethodOfflineDescription;
  72.     /**
  73.      * @var string
  74.      *
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $linkToPaymentInstructions;
  78.     /**
  79.      * @ORM\OneToOne(targetEntity="Country", inversedBy="countrySettings")
  80.      * @ORM\JoinColumn()
  81.      */
  82.     private $country;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $braintreeMerchant;
  87.     /**
  88.      * @ORM\Column(type="datetime")
  89.      */
  90.     private $createdAt;
  91.     /**
  92.      * @ORM\Column(type="datetime", nullable=true)
  93.      */
  94.     private $updatedAt;
  95.     /**
  96.      * @var string
  97.      *
  98.      * @ORM\Column(type="string", nullable=true)
  99.      */
  100.     private $onlinePaymentLabel;
  101.     /**
  102.      * @Vich\UploadableField(mapping="country_logo", fileNameProperty="logoFilename")
  103.      */
  104.     private $logo;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $logoFilename;
  109.     /** @ORM\PrePersist() */
  110.     public function prePersist()
  111.     {
  112.         $this->createdAt = new \DateTime();
  113.     }
  114.     /** @ORM\PreUpdate() */
  115.     public function preUpdate()
  116.     {
  117.         $this->updatedAt = new \DateTime();
  118.     }
  119.     public function __toString()
  120.     {
  121.         return (string)'settings '.$this->country;
  122.     }
  123.     /**
  124.      * Get id
  125.      *
  126.      * @return int
  127.      */
  128.     public function getId()
  129.     {
  130.         return $this->id;
  131.     }
  132.     /**
  133.      * Set isActive
  134.      *
  135.      * @param boolean $isActive
  136.      *
  137.      * @return CountrySettings
  138.      */
  139.     public function setIsActive($isActive)
  140.     {
  141.         $this->isActive $isActive;
  142.         return $this;
  143.     }
  144.     /**
  145.      * Get isActive
  146.      *
  147.      * @return bool
  148.      */
  149.     public function getIsActive()
  150.     {
  151.         return $this->isActive;
  152.     }
  153.     /**
  154.      * Set euMember
  155.      *
  156.      * @param boolean $euMember
  157.      *
  158.      * @return CountrySettings
  159.      */
  160.     public function setEuMember($euMember)
  161.     {
  162.         $this->euMember $euMember;
  163.         return $this;
  164.     }
  165.     /**
  166.      * Get euMember
  167.      *
  168.      * @return bool
  169.      */
  170.     public function getEuMember()
  171.     {
  172.         return $this->euMember;
  173.     }
  174.     /**
  175.      * Set signBeforePrice
  176.      *
  177.      * @param string $signBeforePrice
  178.      *
  179.      * @return CountrySettings
  180.      */
  181.     public function setSignBeforePrice($signBeforePrice)
  182.     {
  183.         $this->signBeforePrice $signBeforePrice;
  184.         return $this;
  185.     }
  186.     /**
  187.      * Get signBeforePrice
  188.      *
  189.      * @return string
  190.      */
  191.     public function getSignBeforePrice()
  192.     {
  193.         return $this->signBeforePrice;
  194.     }
  195.     /**
  196.      * Set signAfterPrice
  197.      *
  198.      * @param string $signAfterPrice
  199.      *
  200.      * @return CountrySettings
  201.      */
  202.     public function setSignAfterPrice($signAfterPrice)
  203.     {
  204.         $this->signAfterPrice $signAfterPrice;
  205.         return $this;
  206.     }
  207.     /**
  208.      * Get signAfterPrice
  209.      *
  210.      * @return string
  211.      */
  212.     public function getSignAfterPrice()
  213.     {
  214.         return $this->signAfterPrice;
  215.     }
  216.     /**
  217.      * Set createdAt
  218.      *
  219.      * @param \DateTime $createdAt
  220.      *
  221.      * @return CountrySettings
  222.      */
  223.     public function setCreatedAt($createdAt)
  224.     {
  225.         $this->createdAt $createdAt;
  226.         return $this;
  227.     }
  228.     /**
  229.      * Get createdAt
  230.      *
  231.      * @return \DateTime
  232.      */
  233.     public function getCreatedAt()
  234.     {
  235.         return $this->createdAt;
  236.     }
  237.     /**
  238.      * Set updatedAt
  239.      *
  240.      * @param \DateTime $updatedAt
  241.      *
  242.      * @return CountrySettings
  243.      */
  244.     public function setUpdatedAt($updatedAt)
  245.     {
  246.         $this->updatedAt $updatedAt;
  247.         return $this;
  248.     }
  249.     /**
  250.      * Get updatedAt
  251.      *
  252.      * @return \DateTime
  253.      */
  254.     public function getUpdatedAt()
  255.     {
  256.         return $this->updatedAt;
  257.     }
  258.     /**
  259.      * Set country
  260.      *
  261.      * @param Country $country
  262.      *
  263.      * @return CountrySettings
  264.      */
  265.     public function setCountry(Country $country null)
  266.     {
  267.         $this->country $country;
  268.         return $this;
  269.     }
  270.     /**
  271.      * Get country
  272.      *
  273.      * @return Country
  274.      */
  275.     public function getCountry()
  276.     {
  277.         return $this->country;
  278.     }
  279.     /**
  280.      * Set vatRateB2b
  281.      *
  282.      * @param integer $vatRateB2b
  283.      *
  284.      * @return CountrySettings
  285.      */
  286.     public function setVatRateB2b($vatRateB2b)
  287.     {
  288.         $this->vatRateB2b $vatRateB2b;
  289.         return $this;
  290.     }
  291.     /**
  292.      * Get vatRateB2b
  293.      *
  294.      * @return integer
  295.      */
  296.     public function getVatRateB2b()
  297.     {
  298.         return $this->vatRateB2b;
  299.     }
  300.     /**
  301.      * Set vatRateB2c
  302.      *
  303.      * @param integer $vatRateB2c
  304.      *
  305.      * @return CountrySettings
  306.      */
  307.     public function setVatRateB2c($vatRateB2c)
  308.     {
  309.         $this->vatRateB2c $vatRateB2c;
  310.         return $this;
  311.     }
  312.     /**
  313.      * Get vatRateB2c
  314.      *
  315.      * @return integer
  316.      */
  317.     public function getVatRateB2c()
  318.     {
  319.         return $this->vatRateB2c;
  320.     }
  321.     /**
  322.      * Set priceCurrency
  323.      *
  324.      * @param string $priceCurrency
  325.      *
  326.      * @return CountrySettings
  327.      */
  328.     public function setPriceCurrency($priceCurrency)
  329.     {
  330.         $this->priceCurrency $priceCurrency;
  331.         return $this;
  332.     }
  333.     /**
  334.      * Get priceCurrency
  335.      *
  336.      * @return string
  337.      */
  338.     public function getPriceCurrency()
  339.     {
  340.         return $this->priceCurrency;
  341.     }
  342.     /**
  343.      * Set onlinePaymentLabel
  344.      *
  345.      * @param string $paymentLabel
  346.      *
  347.      * @return CountrySettings
  348.      */
  349.     public function setOnlinePaymentLabel($onlinePaymentLabel)
  350.     {
  351.         $this->onlinePaymentLabel $onlinePaymentLabel;
  352.         return $this;
  353.     }
  354.     /**
  355.      * Get onlinePaymentLabel
  356.      *
  357.      * @return string
  358.      */
  359.     public function getOnlinePaymentLabel()
  360.     {
  361.         return $this->onlinePaymentLabel;
  362.     }
  363.     /**
  364.      * Set paymentMethodOnlineDescription
  365.      *
  366.      * @param string $paymentMethodOnlineDescription
  367.      *
  368.      * @return CountrySettings
  369.      */
  370.     public function setPaymentMethodOnlineDescription($paymentMethodOnlineDescription)
  371.     {
  372.         $this->paymentMethodOnlineDescription $paymentMethodOnlineDescription;
  373.         return $this;
  374.     }
  375.     /**
  376.      * Get paymentMethodOnlineDescription
  377.      *
  378.      * @return string
  379.      */
  380.     public function getPaymentMethodOnlineDescription()
  381.     {
  382.         return $this->paymentMethodOnlineDescription;
  383.     }
  384.     /**
  385.      * Set paymentMethodOfflineDescription
  386.      *
  387.      * @param string $paymentMethodOfflineDescription
  388.      *
  389.      * @return CountrySettings
  390.      */
  391.     public function setPaymentMethodOfflineDescription($paymentMethodOfflineDescription)
  392.     {
  393.         $this->paymentMethodOfflineDescription $paymentMethodOfflineDescription;
  394.         return $this;
  395.     }
  396.     /**
  397.      * Get paymentMethodOfflineDescription
  398.      *
  399.      * @return string
  400.      */
  401.     public function getPaymentMethodOfflineDescription()
  402.     {
  403.         return $this->paymentMethodOfflineDescription;
  404.     }
  405.     /**
  406.      * Set linkToPaymentInstructions
  407.      *
  408.      * @param string $linkToPaymentInstructions
  409.      *
  410.      * @return CountrySettings
  411.      */
  412.     public function setLinkToPaymentInstructions($linkToPaymentInstructions)
  413.     {
  414.         $this->linkToPaymentInstructions $linkToPaymentInstructions;
  415.         return $this;
  416.     }
  417.     /**
  418.      * Get linkToPaymentInstructions
  419.      *
  420.      * @return string
  421.      */
  422.     public function getLinkToPaymentInstructions()
  423.     {
  424.         return $this->linkToPaymentInstructions;
  425.     }
  426.     /**
  427.      * Set braintreeMerchant
  428.      *
  429.      * @param string $braintreeMerchant
  430.      *
  431.      * @return CountrySettings
  432.      */
  433.     public function setBraintreeMerchant($braintreeMerchant)
  434.     {
  435.         $this->braintreeMerchant $braintreeMerchant;
  436.         return $this;
  437.     }
  438.     /**
  439.      * Get braintreeMerchant
  440.      *
  441.      * @return string
  442.      */
  443.     public function getBraintreeMerchant()
  444.     {
  445.         return $this->braintreeMerchant;
  446.     }
  447.     public function setLogo(?File $logo null): void
  448.     {
  449.         $this->logo $logo;
  450.         if ($logo !== null)
  451.         {
  452.             $this->updatedAt = new \DateTimeImmutable();
  453.         }
  454.     }
  455.     public function getLogo(): ?File
  456.     {
  457.         return $this->logo;
  458.     }
  459.     public function getLogoFilename(): ?string
  460.     {
  461.         return $this->logoFilename;
  462.     }
  463.     public function setLogoFilename(?string $logoFilename): self
  464.     {
  465.         $this->logoFilename $logoFilename;
  466.         return $this;
  467.     }
  468. }