src/Diplix/KMGBundle/Entity/Platform/PlatformClient.php line 13

Open in your IDE?
  1. <?php
  2. namespace Diplix\KMGBundle\Entity\Platform;
  3. use Diplix\KMGBundle\Entity\BasicEntity;
  4. use Diplix\KMGBundle\Entity\Order;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  7. /**
  8.  * @ORM\Table(name="platform_clients", indexes={@ORM\Index(name="be_deleted",columns={"be_deleted"})})
  9.  * @ORM\Entity(repositoryClass="Diplix\KMGBundle\Repository\PlatformClientRepository")
  10.  */
  11. class PlatformClient extends BasicEntity
  12. {
  13.     const DEFAULT_DASHBOARD "standard";
  14.     /**
  15.      * @ORM\Column(type="string",name="id")
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue(strategy="CUSTOM")
  18.      * @ORM\CustomIdGenerator(class="Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator")
  19.      */
  20.     protected $id;
  21.     /**
  22.      * @ORM\Column(type="string")
  23.      */
  24.     protected $name;
  25.     /**
  26.      * @ORM\Column(type="string")
  27.      */
  28.     protected $pdfSenderShort '(Absender)';
  29.     /**
  30.      * @ORM\Column(type="text")
  31.      */
  32.     protected $pdfSenderLong '';
  33.     /**
  34.      * @ORM\Column(type="text")
  35.      */
  36.     protected $pdfFooter '';
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\File", fetch="EAGER")
  39.      * @ORM\JoinColumn(referencedColumnName="id",nullable=true)
  40.      */
  41.     protected $pdfLogo;
  42.     /**
  43.      * @ORM\Column(type="text")
  44.      */
  45.     protected $pdfConfirmationText '';
  46.     /**
  47.      * @ORM\Column(type="string")
  48.      */
  49.     protected $mailSenderName '';
  50.     /**
  51.      * @ORM\Column(type="string")
  52.      */
  53.     protected $mailSenderAddress  '';
  54.     /**
  55.      * @ORM\Column(type="string")
  56.      */
  57.     protected $mailBcc  '';
  58.     /**
  59.      * @ORM\Column(type="string")
  60.      */
  61.     protected $mailReplyTo '';
  62.     /**
  63.      * @ORM\Column(type="string")
  64.      */
  65.     protected $mailDsn  '';
  66.     /**
  67.      * @ORM\Column(type="text")
  68.      */
  69.     protected $mailFooter '';
  70.     /**
  71.      * @ORM\Column(type="text")
  72.      */
  73.     protected $infoNotice '';
  74.     /**
  75.      * @ORM\Column(type="text")
  76.      */
  77.     protected $infoSupport '';
  78.     /**
  79.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\File", fetch="EAGER")
  80.      * @ORM\JoinColumn(referencedColumnName="id",nullable=true)
  81.      */
  82.     protected $mainLogo;
  83.     /**
  84.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\File", fetch="EAGER")
  85.      * @ORM\JoinColumn(referencedColumnName="id",nullable=true)
  86.      */
  87.     protected $navLogo;
  88.     /**
  89.      * @ORM\Column(type="json")
  90.      */
  91.     protected $carTypePersons = [];
  92.     /**
  93.      * @ORM\Column(type="integer", nullable=true, options={"default":1})
  94.      * Null or 0..X days to add from current date
  95.      */
  96.     protected $orderTimeOffsetOnNewOrder;
  97.     /**
  98.      * @ORM\Column(type="boolean", options={"default":0})
  99.      */
  100.     protected $ignoreTaxameterForPaymentCalc false;
  101.     /**
  102.      * @ORM\Column(type="boolean", options={"default":0})
  103.      */
  104.     protected $hidePricesForCustomer false;
  105.     /**
  106.      * @ORM\Column(type="boolean", options={"default":0})
  107.      */
  108.     protected $alternateJobListView false;
  109.     /**
  110.      * @ORM\Column(type="boolean", options={"default":0})
  111.      */
  112.     protected $extraFields false;
  113.     /**
  114.      * @ORM\Column(type="boolean", options={"default":0})
  115.      */
  116.     protected $jobAlwaysRecalculateCustomerPrice false;
  117.     /**
  118.      * @ORM\Column(type="boolean", options={"default":1})
  119.      */
  120.     protected $deductKmOnFraCombiRideForCalc true// Flag only for calculation , NOT for rate decision
  121.     /**
  122.      * @ORM\Column(type="integer", nullable=false)
  123.      */
  124.     protected $kmSecurePlusIfGte 0;
  125.     /**
  126.      * @ORM\Column(type="integer", nullable=false)
  127.      */
  128.     protected $kmSecurePlus 0;
  129.     /**
  130.      * @ORM\Column(type="boolean", options={"default":0})
  131.      */
  132.     protected $addTaxiGeldAufschlagToCustomerPrice false;
  133.     /**
  134.      * @ORM\Column(type="integer", nullable=false)
  135.      */
  136.     protected $taxiKmAufschlagKurzstrecke 0;
  137.     /**
  138.      * @ORM\Column(type="text")
  139.      */
  140.     protected $orderNotice '';
  141.     /**
  142.      * @ORM\Column(type="text", nullable=true)
  143.      */
  144.     protected ?string $spryApiKey null;
  145.     /**
  146.      * @ORM\Column(type="text", nullable=true)
  147.      */
  148.     protected ?string $stripeApiKey null;
  149.     /**
  150.      * @ORM\Column(type="text", nullable=true)
  151.      */
  152.     protected ?string $stripePublicKey null;
  153.     /**
  154.      * @ORM\Column(type="text", nullable=false)
  155.      */
  156.     protected string $smsSender '';
  157.     /**
  158.      * @ORM\Column(type="boolean", options={"default":0})
  159.      */
  160.     protected $useRatingMail false;
  161.     /**
  162.      * @ORM\Column(type="string", nullable=false)
  163.      */
  164.     protected string $datenschutzUrl '';
  165.     /**
  166.      * @ORM\Column(type="text")
  167.      */
  168.     protected $memberOrderExportText '';
  169.     /**
  170.      * @ORM\Column(type="boolean", options={"default":1})
  171.      */
  172.     protected $memberOrderExportDetailed true;
  173.     /**
  174.      * @ORM\Column(type="json")
  175.      */
  176.     protected ?array $dashboardCategories = [];
  177.     public function __construct($name=null)
  178.     {
  179.         $this->name $name;
  180.     }
  181.     /**
  182.      * @return mixed
  183.      */
  184.     public function getId()
  185.     {
  186.         return $this->id;
  187.     }
  188.     /**
  189.      * @return mixed
  190.      */
  191.     public function getName()
  192.     {
  193.         return $this->name;
  194.     }
  195.     /**
  196.      * @param mixed $name
  197.      */
  198.     public function setName($name): void
  199.     {
  200.         $this->name $name;
  201.     }
  202.     /**
  203.      * @return mixed
  204.      */
  205.     public function getPdfSenderShort()
  206.     {
  207.         return $this->pdfSenderShort;
  208.     }
  209.     /**
  210.      * @param mixed $pdfSenderShort
  211.      */
  212.     public function setPdfSenderShort($pdfSenderShort): void
  213.     {
  214.         $this->pdfSenderShort $pdfSenderShort;
  215.     }
  216.     /**
  217.      * @return mixed
  218.      */
  219.     public function getPdfSenderLong()
  220.     {
  221.         return $this->pdfSenderLong;
  222.     }
  223.     /**
  224.      * @param mixed $pdfSenderLong
  225.      */
  226.     public function setPdfSenderLong($pdfSenderLong): void
  227.     {
  228.         $this->pdfSenderLong $pdfSenderLong;
  229.     }
  230.     /**
  231.      * @return mixed
  232.      */
  233.     public function getPdfFooter()
  234.     {
  235.         return $this->pdfFooter;
  236.     }
  237.     /**
  238.      * @param mixed $pdfFooter
  239.      */
  240.     public function setPdfFooter($pdfFooter): void
  241.     {
  242.         $this->pdfFooter $pdfFooter;
  243.     }
  244.     /**
  245.      * @return mixed
  246.      */
  247.     public function getPdfLogo()
  248.     {
  249.         return $this->pdfLogo;
  250.     }
  251.     /**
  252.      * @param mixed $pdfLogo
  253.      */
  254.     public function setPdfLogo($pdfLogo): void
  255.     {
  256.         $this->pdfLogo $pdfLogo;
  257.     }
  258.     /**
  259.      * @return mixed
  260.      */
  261.     public function getMailSenderName()
  262.     {
  263.         return $this->mailSenderName;
  264.     }
  265.     /**
  266.      * @param mixed $mailSenderName
  267.      */
  268.     public function setMailSenderName($mailSenderName): void
  269.     {
  270.         $this->mailSenderName $mailSenderName;
  271.     }
  272.     /**
  273.      * @return mixed
  274.      */
  275.     public function getMailSenderAddress()
  276.     {
  277.         return $this->mailSenderAddress;
  278.     }
  279.     /**
  280.      * @param mixed $mailSenderAddress
  281.      */
  282.     public function setMailSenderAddress($mailSenderAddress): void
  283.     {
  284.         $this->mailSenderAddress $mailSenderAddress;
  285.     }
  286.     /**
  287.      * @return mixed
  288.      */
  289.     public function getMailBcc()
  290.     {
  291.         return $this->mailBcc;
  292.     }
  293.     /**
  294.      * @param mixed $mailBcc
  295.      */
  296.     public function setMailBcc($mailBcc): void
  297.     {
  298.         $this->mailBcc $mailBcc;
  299.     }
  300.     /**
  301.      * @return mixed
  302.      */
  303.     public function getMailDsn()
  304.     {
  305.         return $this->mailDsn;
  306.     }
  307.     /**
  308.      * @param mixed $mailDsn
  309.      */
  310.     public function setMailDsn($mailDsn): void
  311.     {
  312.         $this->mailDsn $mailDsn;
  313.     }
  314.     /**
  315.      * @return mixed
  316.      */
  317.     public function getMailFooter()
  318.     {
  319.         return $this->mailFooter;
  320.     }
  321.     /**
  322.      * @param mixed $mailFooter
  323.      */
  324.     public function setMailFooter($mailFooter): void
  325.     {
  326.         $this->mailFooter $mailFooter;
  327.     }
  328.     /**
  329.      * @return string
  330.      */
  331.     public function getPdfConfirmationText(): string
  332.     {
  333.         return $this->pdfConfirmationText;
  334.     }
  335.     /**
  336.      * @param string $pdfConfirmationText
  337.      */
  338.     public function setPdfConfirmationText(string $pdfConfirmationText): void
  339.     {
  340.         $this->pdfConfirmationText $pdfConfirmationText;
  341.     }
  342.     /**
  343.      * @return string
  344.      */
  345.     public function getInfoNotice(): string
  346.     {
  347.         return $this->infoNotice;
  348.     }
  349.     /**
  350.      * @param string $infoNotice
  351.      */
  352.     public function setInfoNotice(string $infoNotice): void
  353.     {
  354.         $this->infoNotice $infoNotice;
  355.     }
  356.     /**
  357.      * @return string
  358.      */
  359.     public function getInfoSupport(): string
  360.     {
  361.         return $this->infoSupport;
  362.     }
  363.     /**
  364.      * @param string $infoSupport
  365.      */
  366.     public function setInfoSupport(string $infoSupport): void
  367.     {
  368.         $this->infoSupport $infoSupport;
  369.     }
  370.     /**
  371.      * @return mixed
  372.      */
  373.     public function getMainLogo()
  374.     {
  375.         return $this->mainLogo;
  376.     }
  377.     /**
  378.      * @param mixed $mainLogo
  379.      */
  380.     public function setMainLogo($mainLogo): void
  381.     {
  382.         $this->mainLogo $mainLogo;
  383.     }
  384.     /**
  385.      * @return mixed
  386.      */
  387.     public function getNavLogo()
  388.     {
  389.         return $this->navLogo;
  390.     }
  391.     /**
  392.      * @param mixed $navLogo
  393.      */
  394.     public function setNavLogo($navLogo): void
  395.     {
  396.         $this->navLogo $navLogo;
  397.     }
  398.     /**
  399.      * @return array
  400.      */
  401.     public function getCarTypePersons(): array
  402.     {
  403.         return array_merge(Order::$carPersonsMax$this->carTypePersons ?? []);
  404.     }
  405.     /**
  406.      * @param array $carTypePersons
  407.      */
  408.     public function setCarTypePersons(array $carTypePersons): void
  409.     {
  410.         $this->carTypePersons $carTypePersons;
  411.     }
  412.     /**
  413.      * @return int|null
  414.      */
  415.     public function getOrderTimeOffsetOnNewOrder()
  416.     {
  417.         return $this->orderTimeOffsetOnNewOrder;
  418.     }
  419.     /**
  420.      * @param mixed $orderTimeOffsetOnNewOrder
  421.      */
  422.     public function setOrderTimeOffsetOnNewOrder($orderTimeOffsetOnNewOrder): void
  423.     {
  424.         $this->orderTimeOffsetOnNewOrder $orderTimeOffsetOnNewOrder;
  425.     }
  426.     /**
  427.      * @return bool
  428.      */
  429.     public function isIgnoreTaxameterForPaymentCalc(): bool
  430.     {
  431.         return $this->ignoreTaxameterForPaymentCalc;
  432.     }
  433.     /**
  434.      * @param bool $ignoreTaxameterForPaymentCalc
  435.      */
  436.     public function setIgnoreTaxameterForPaymentCalc(bool $ignoreTaxameterForPaymentCalc): void
  437.     {
  438.         $this->ignoreTaxameterForPaymentCalc $ignoreTaxameterForPaymentCalc;
  439.     }
  440.     /**
  441.      * @return bool
  442.      */
  443.     public function isHidePricesForCustomer(): bool
  444.     {
  445.         return $this->hidePricesForCustomer;
  446.     }
  447.     /**
  448.      * @param bool $hidePricesForCustomer
  449.      */
  450.     public function setHidePricesForCustomer(bool $hidePricesForCustomer): void
  451.     {
  452.         $this->hidePricesForCustomer $hidePricesForCustomer;
  453.     }
  454.     /**
  455.      * @return bool
  456.      */
  457.     public function isAlternateJobListView(): bool
  458.     {
  459.         return $this->alternateJobListView;
  460.     }
  461.     /**
  462.      * @param bool $alternateJobListView
  463.      */
  464.     public function setAlternateJobListView(bool $alternateJobListView): void
  465.     {
  466.         $this->alternateJobListView $alternateJobListView;
  467.     }
  468.     /**
  469.      * @return bool
  470.      */
  471.     public function isExtraFields(): bool
  472.     {
  473.         return $this->extraFields;
  474.     }
  475.     /**
  476.      * @param bool $extraFields
  477.      */
  478.     public function setExtraFields(bool $extraFields): void
  479.     {
  480.         $this->extraFields $extraFields;
  481.     }
  482.     /**
  483.      * @return bool
  484.      */
  485.     public function isJobAlwaysRecalculateCustomerPrice(): bool
  486.     {
  487.         return $this->jobAlwaysRecalculateCustomerPrice;
  488.     }
  489.     /**
  490.      * @param bool $jobAlwaysRecalculateCustomerPrice
  491.      */
  492.     public function setJobAlwaysRecalculateCustomerPrice(bool $jobAlwaysRecalculateCustomerPrice): void
  493.     {
  494.         $this->jobAlwaysRecalculateCustomerPrice $jobAlwaysRecalculateCustomerPrice;
  495.     }
  496.     /**
  497.      * @return bool
  498.      */
  499.     public function isDeductKmOnFraCombiRideForCalc(): bool
  500.     {
  501.         return $this->deductKmOnFraCombiRideForCalc;
  502.     }
  503.     /**
  504.      * @param bool $deductKmOnFraCombiRideForCalc
  505.      */
  506.     public function setDeductKmOnFraCombiRideForCalc(bool $deductKmOnFraCombiRideForCalc): void
  507.     {
  508.         $this->deductKmOnFraCombiRideForCalc $deductKmOnFraCombiRideForCalc;
  509.     }
  510.     /**
  511.      * @return int
  512.      */
  513.     public function getKmSecurePlusIfGte(): int
  514.     {
  515.         return $this->kmSecurePlusIfGte;
  516.     }
  517.     /**
  518.      * @param int $kmSecurePlusIfGte
  519.      */
  520.     public function setKmSecurePlusIfGte(int $kmSecurePlusIfGte): void
  521.     {
  522.         $this->kmSecurePlusIfGte $kmSecurePlusIfGte;
  523.     }
  524.     /**
  525.      * @return int
  526.      */
  527.     public function getKmSecurePlus(): int
  528.     {
  529.         return $this->kmSecurePlus;
  530.     }
  531.     /**
  532.      * @param int $kmSecurePlus
  533.      */
  534.     public function setKmSecurePlus(int $kmSecurePlus): void
  535.     {
  536.         $this->kmSecurePlus $kmSecurePlus;
  537.     }
  538.     /**
  539.      * @return int
  540.      */
  541.     public function getTaxiKmAufschlagKurzstrecke(): int
  542.     {
  543.         return $this->taxiKmAufschlagKurzstrecke;
  544.     }
  545.     /**
  546.      * @param int $taxiKmAufschlagKurzstrecke
  547.      */
  548.     public function setTaxiKmAufschlagKurzstrecke(int $taxiKmAufschlagKurzstrecke): void
  549.     {
  550.         $this->taxiKmAufschlagKurzstrecke $taxiKmAufschlagKurzstrecke;
  551.     }
  552.     /**
  553.      * @return string
  554.      */
  555.     public function getOrderNotice(): string
  556.     {
  557.         return $this->orderNotice;
  558.     }
  559.     /**
  560.      * @param string $orderNotice
  561.      */
  562.     public function setOrderNotice(string $orderNotice): void
  563.     {
  564.         $this->orderNotice $orderNotice;
  565.     }
  566.     /**
  567.      * @return bool
  568.      */
  569.     public function isAddTaxiGeldAufschlagToCustomerPrice(): bool
  570.     {
  571.         return $this->addTaxiGeldAufschlagToCustomerPrice;
  572.     }
  573.     /**
  574.      * @param bool $addTaxiGeldAufschlagToCustomerPrice
  575.      */
  576.     public function setAddTaxiGeldAufschlagToCustomerPrice(bool $addTaxiGeldAufschlagToCustomerPrice): void
  577.     {
  578.         $this->addTaxiGeldAufschlagToCustomerPrice $addTaxiGeldAufschlagToCustomerPrice;
  579.     }
  580.     /**
  581.      * @return null
  582.      */
  583.     public function getSpryApiKey()
  584.     {
  585.         return $this->spryApiKey;
  586.     }
  587.     /**
  588.      * @param null $spryApiKey
  589.      */
  590.     public function setSpryApiKey($spryApiKey): void
  591.     {
  592.         $this->spryApiKey $spryApiKey;
  593.     }
  594.     /**
  595.      * @return string
  596.      */
  597.     public function getSmsSender(): string
  598.     {
  599.         return $this->smsSender;
  600.     }
  601.     /**
  602.      * @param string $smsSender
  603.      */
  604.     public function setSmsSender(string $smsSender): void
  605.     {
  606.         $this->smsSender $smsSender;
  607.     }
  608.     /**
  609.      * @return bool
  610.      */
  611.     public function isUseRatingMail(): bool
  612.     {
  613.         return $this->useRatingMail;
  614.     }
  615.     /**
  616.      * @param bool $useRatingMail
  617.      */
  618.     public function setUseRatingMail(bool $useRatingMail): void
  619.     {
  620.         $this->useRatingMail $useRatingMail;
  621.     }
  622.     /**
  623.      * @return string
  624.      */
  625.     public function getDatenschutzUrl(): string
  626.     {
  627.         return $this->datenschutzUrl;
  628.     }
  629.     /**
  630.      * @param string $datenschutzUrl
  631.      */
  632.     public function setDatenschutzUrl(string $datenschutzUrl): void
  633.     {
  634.         $this->datenschutzUrl $datenschutzUrl;
  635.     }
  636.     /**
  637.      * @return string
  638.      */
  639.     public function getMailReplyTo(): string
  640.     {
  641.         return $this->mailReplyTo;
  642.     }
  643.     /**
  644.      * @param string $mailReplyTo
  645.      */
  646.     public function setMailReplyTo(string $mailReplyTo): void
  647.     {
  648.         $this->mailReplyTo $mailReplyTo;
  649.     }
  650.     /**
  651.      * @return string
  652.      */
  653.     public function getMemberOrderExportText(): string
  654.     {
  655.         return $this->memberOrderExportText;
  656.     }
  657.     /**
  658.      * @param string $memberOrderExportText
  659.      */
  660.     public function setMemberOrderExportText(string $memberOrderExportText): void
  661.     {
  662.         $this->memberOrderExportText $memberOrderExportText;
  663.     }
  664.     public function isMemberOrderExportDetailed(): bool
  665.     {
  666.         return $this->memberOrderExportDetailed;
  667.     }
  668.     public function setMemberOrderExportDetailed(bool $memberOrderExportDetailed): void
  669.     {
  670.         $this->memberOrderExportDetailed $memberOrderExportDetailed;
  671.     }
  672.     public function getStripeApiKey(): ?string
  673.     {
  674.         return $this->stripeApiKey;
  675.     }
  676.     public function setStripeApiKey(?string $stripeApiKey): void
  677.     {
  678.         $this->stripeApiKey $stripeApiKey;
  679.     }
  680.     public function getStripePublicKey(): ?string
  681.     {
  682.         return $this->stripePublicKey;
  683.     }
  684.     public function setStripePublicKey(?string $stripePublicKey): void
  685.     {
  686.         $this->stripePublicKey $stripePublicKey;
  687.     }
  688.     public function getDashboardCategories(): array
  689.     {
  690.         return $this->dashboardCategories ?? [];
  691.     }
  692.     public function setDashboardCategories(array $dashboardCategories): void
  693.     {
  694.         $dashboardCategories array_filter($dashboardCategories, function($x) {
  695.             return $x !== PlatformClient::DEFAULT_DASHBOARD;
  696.         });
  697.         $this->dashboardCategories $dashboardCategories;
  698.     }
  699. }