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.     /**
  178.      * @ORM\Column(type="boolean", options={"default":0})
  179.      */
  180.     protected $applicantTimeRidePayoutCalculatedPer15Min false;
  181.     public function __construct($name=null)
  182.     {
  183.         $this->name $name;
  184.     }
  185.     /**
  186.      * @return mixed
  187.      */
  188.     public function getId()
  189.     {
  190.         return $this->id;
  191.     }
  192.     /**
  193.      * @return mixed
  194.      */
  195.     public function getName()
  196.     {
  197.         return $this->name;
  198.     }
  199.     /**
  200.      * @param mixed $name
  201.      */
  202.     public function setName($name): void
  203.     {
  204.         $this->name $name;
  205.     }
  206.     /**
  207.      * @return mixed
  208.      */
  209.     public function getPdfSenderShort()
  210.     {
  211.         return $this->pdfSenderShort;
  212.     }
  213.     /**
  214.      * @param mixed $pdfSenderShort
  215.      */
  216.     public function setPdfSenderShort($pdfSenderShort): void
  217.     {
  218.         $this->pdfSenderShort $pdfSenderShort;
  219.     }
  220.     /**
  221.      * @return mixed
  222.      */
  223.     public function getPdfSenderLong()
  224.     {
  225.         return $this->pdfSenderLong;
  226.     }
  227.     /**
  228.      * @param mixed $pdfSenderLong
  229.      */
  230.     public function setPdfSenderLong($pdfSenderLong): void
  231.     {
  232.         $this->pdfSenderLong $pdfSenderLong;
  233.     }
  234.     /**
  235.      * @return mixed
  236.      */
  237.     public function getPdfFooter()
  238.     {
  239.         return $this->pdfFooter;
  240.     }
  241.     /**
  242.      * @param mixed $pdfFooter
  243.      */
  244.     public function setPdfFooter($pdfFooter): void
  245.     {
  246.         $this->pdfFooter $pdfFooter;
  247.     }
  248.     /**
  249.      * @return mixed
  250.      */
  251.     public function getPdfLogo()
  252.     {
  253.         return $this->pdfLogo;
  254.     }
  255.     /**
  256.      * @param mixed $pdfLogo
  257.      */
  258.     public function setPdfLogo($pdfLogo): void
  259.     {
  260.         $this->pdfLogo $pdfLogo;
  261.     }
  262.     /**
  263.      * @return mixed
  264.      */
  265.     public function getMailSenderName()
  266.     {
  267.         return $this->mailSenderName;
  268.     }
  269.     /**
  270.      * @param mixed $mailSenderName
  271.      */
  272.     public function setMailSenderName($mailSenderName): void
  273.     {
  274.         $this->mailSenderName $mailSenderName;
  275.     }
  276.     /**
  277.      * @return mixed
  278.      */
  279.     public function getMailSenderAddress()
  280.     {
  281.         return $this->mailSenderAddress;
  282.     }
  283.     /**
  284.      * @param mixed $mailSenderAddress
  285.      */
  286.     public function setMailSenderAddress($mailSenderAddress): void
  287.     {
  288.         $this->mailSenderAddress $mailSenderAddress;
  289.     }
  290.     /**
  291.      * @return mixed
  292.      */
  293.     public function getMailBcc()
  294.     {
  295.         return $this->mailBcc;
  296.     }
  297.     /**
  298.      * @param mixed $mailBcc
  299.      */
  300.     public function setMailBcc($mailBcc): void
  301.     {
  302.         $this->mailBcc $mailBcc;
  303.     }
  304.     /**
  305.      * @return mixed
  306.      */
  307.     public function getMailDsn()
  308.     {
  309.         return $this->mailDsn;
  310.     }
  311.     /**
  312.      * @param mixed $mailDsn
  313.      */
  314.     public function setMailDsn($mailDsn): void
  315.     {
  316.         $this->mailDsn $mailDsn;
  317.     }
  318.     /**
  319.      * @return mixed
  320.      */
  321.     public function getMailFooter()
  322.     {
  323.         return $this->mailFooter;
  324.     }
  325.     /**
  326.      * @param mixed $mailFooter
  327.      */
  328.     public function setMailFooter($mailFooter): void
  329.     {
  330.         $this->mailFooter $mailFooter;
  331.     }
  332.     /**
  333.      * @return string
  334.      */
  335.     public function getPdfConfirmationText(): string
  336.     {
  337.         return $this->pdfConfirmationText;
  338.     }
  339.     /**
  340.      * @param string $pdfConfirmationText
  341.      */
  342.     public function setPdfConfirmationText(string $pdfConfirmationText): void
  343.     {
  344.         $this->pdfConfirmationText $pdfConfirmationText;
  345.     }
  346.     /**
  347.      * @return string
  348.      */
  349.     public function getInfoNotice(): string
  350.     {
  351.         return $this->infoNotice;
  352.     }
  353.     /**
  354.      * @param string $infoNotice
  355.      */
  356.     public function setInfoNotice(string $infoNotice): void
  357.     {
  358.         $this->infoNotice $infoNotice;
  359.     }
  360.     /**
  361.      * @return string
  362.      */
  363.     public function getInfoSupport(): string
  364.     {
  365.         return $this->infoSupport;
  366.     }
  367.     /**
  368.      * @param string $infoSupport
  369.      */
  370.     public function setInfoSupport(string $infoSupport): void
  371.     {
  372.         $this->infoSupport $infoSupport;
  373.     }
  374.     /**
  375.      * @return mixed
  376.      */
  377.     public function getMainLogo()
  378.     {
  379.         return $this->mainLogo;
  380.     }
  381.     /**
  382.      * @param mixed $mainLogo
  383.      */
  384.     public function setMainLogo($mainLogo): void
  385.     {
  386.         $this->mainLogo $mainLogo;
  387.     }
  388.     /**
  389.      * @return mixed
  390.      */
  391.     public function getNavLogo()
  392.     {
  393.         return $this->navLogo;
  394.     }
  395.     /**
  396.      * @param mixed $navLogo
  397.      */
  398.     public function setNavLogo($navLogo): void
  399.     {
  400.         $this->navLogo $navLogo;
  401.     }
  402.     /**
  403.      * @return array
  404.      */
  405.     public function getCarTypePersons(): array
  406.     {
  407.         return array_merge(Order::$carPersonsMax$this->carTypePersons ?? []);
  408.     }
  409.     /**
  410.      * @param array $carTypePersons
  411.      */
  412.     public function setCarTypePersons(array $carTypePersons): void
  413.     {
  414.         $this->carTypePersons $carTypePersons;
  415.     }
  416.     /**
  417.      * @return int|null
  418.      */
  419.     public function getOrderTimeOffsetOnNewOrder()
  420.     {
  421.         return $this->orderTimeOffsetOnNewOrder;
  422.     }
  423.     /**
  424.      * @param mixed $orderTimeOffsetOnNewOrder
  425.      */
  426.     public function setOrderTimeOffsetOnNewOrder($orderTimeOffsetOnNewOrder): void
  427.     {
  428.         $this->orderTimeOffsetOnNewOrder $orderTimeOffsetOnNewOrder;
  429.     }
  430.     /**
  431.      * @return bool
  432.      */
  433.     public function isIgnoreTaxameterForPaymentCalc(): bool
  434.     {
  435.         return $this->ignoreTaxameterForPaymentCalc;
  436.     }
  437.     /**
  438.      * @param bool $ignoreTaxameterForPaymentCalc
  439.      */
  440.     public function setIgnoreTaxameterForPaymentCalc(bool $ignoreTaxameterForPaymentCalc): void
  441.     {
  442.         $this->ignoreTaxameterForPaymentCalc $ignoreTaxameterForPaymentCalc;
  443.     }
  444.     /**
  445.      * @return bool
  446.      */
  447.     public function isHidePricesForCustomer(): bool
  448.     {
  449.         return $this->hidePricesForCustomer;
  450.     }
  451.     /**
  452.      * @param bool $hidePricesForCustomer
  453.      */
  454.     public function setHidePricesForCustomer(bool $hidePricesForCustomer): void
  455.     {
  456.         $this->hidePricesForCustomer $hidePricesForCustomer;
  457.     }
  458.     /**
  459.      * @return bool
  460.      */
  461.     public function isAlternateJobListView(): bool
  462.     {
  463.         return $this->alternateJobListView;
  464.     }
  465.     /**
  466.      * @param bool $alternateJobListView
  467.      */
  468.     public function setAlternateJobListView(bool $alternateJobListView): void
  469.     {
  470.         $this->alternateJobListView $alternateJobListView;
  471.     }
  472.     /**
  473.      * @return bool
  474.      */
  475.     public function isExtraFields(): bool
  476.     {
  477.         return $this->extraFields;
  478.     }
  479.     /**
  480.      * @param bool $extraFields
  481.      */
  482.     public function setExtraFields(bool $extraFields): void
  483.     {
  484.         $this->extraFields $extraFields;
  485.     }
  486.     /**
  487.      * @return bool
  488.      */
  489.     public function isJobAlwaysRecalculateCustomerPrice(): bool
  490.     {
  491.         return $this->jobAlwaysRecalculateCustomerPrice;
  492.     }
  493.     /**
  494.      * @param bool $jobAlwaysRecalculateCustomerPrice
  495.      */
  496.     public function setJobAlwaysRecalculateCustomerPrice(bool $jobAlwaysRecalculateCustomerPrice): void
  497.     {
  498.         $this->jobAlwaysRecalculateCustomerPrice $jobAlwaysRecalculateCustomerPrice;
  499.     }
  500.     /**
  501.      * @return bool
  502.      */
  503.     public function isDeductKmOnFraCombiRideForCalc(): bool
  504.     {
  505.         return $this->deductKmOnFraCombiRideForCalc;
  506.     }
  507.     /**
  508.      * @param bool $deductKmOnFraCombiRideForCalc
  509.      */
  510.     public function setDeductKmOnFraCombiRideForCalc(bool $deductKmOnFraCombiRideForCalc): void
  511.     {
  512.         $this->deductKmOnFraCombiRideForCalc $deductKmOnFraCombiRideForCalc;
  513.     }
  514.     /**
  515.      * @return int
  516.      */
  517.     public function getKmSecurePlusIfGte(): int
  518.     {
  519.         return $this->kmSecurePlusIfGte;
  520.     }
  521.     /**
  522.      * @param int $kmSecurePlusIfGte
  523.      */
  524.     public function setKmSecurePlusIfGte(int $kmSecurePlusIfGte): void
  525.     {
  526.         $this->kmSecurePlusIfGte $kmSecurePlusIfGte;
  527.     }
  528.     /**
  529.      * @return int
  530.      */
  531.     public function getKmSecurePlus(): int
  532.     {
  533.         return $this->kmSecurePlus;
  534.     }
  535.     /**
  536.      * @param int $kmSecurePlus
  537.      */
  538.     public function setKmSecurePlus(int $kmSecurePlus): void
  539.     {
  540.         $this->kmSecurePlus $kmSecurePlus;
  541.     }
  542.     /**
  543.      * @return int
  544.      */
  545.     public function getTaxiKmAufschlagKurzstrecke(): int
  546.     {
  547.         return $this->taxiKmAufschlagKurzstrecke;
  548.     }
  549.     /**
  550.      * @param int $taxiKmAufschlagKurzstrecke
  551.      */
  552.     public function setTaxiKmAufschlagKurzstrecke(int $taxiKmAufschlagKurzstrecke): void
  553.     {
  554.         $this->taxiKmAufschlagKurzstrecke $taxiKmAufschlagKurzstrecke;
  555.     }
  556.     /**
  557.      * @return string
  558.      */
  559.     public function getOrderNotice(): string
  560.     {
  561.         return $this->orderNotice;
  562.     }
  563.     /**
  564.      * @param string $orderNotice
  565.      */
  566.     public function setOrderNotice(string $orderNotice): void
  567.     {
  568.         $this->orderNotice $orderNotice;
  569.     }
  570.     /**
  571.      * @return bool
  572.      */
  573.     public function isAddTaxiGeldAufschlagToCustomerPrice(): bool
  574.     {
  575.         return $this->addTaxiGeldAufschlagToCustomerPrice;
  576.     }
  577.     /**
  578.      * @param bool $addTaxiGeldAufschlagToCustomerPrice
  579.      */
  580.     public function setAddTaxiGeldAufschlagToCustomerPrice(bool $addTaxiGeldAufschlagToCustomerPrice): void
  581.     {
  582.         $this->addTaxiGeldAufschlagToCustomerPrice $addTaxiGeldAufschlagToCustomerPrice;
  583.     }
  584.     /**
  585.      * @return null
  586.      */
  587.     public function getSpryApiKey()
  588.     {
  589.         return $this->spryApiKey;
  590.     }
  591.     /**
  592.      * @param null $spryApiKey
  593.      */
  594.     public function setSpryApiKey($spryApiKey): void
  595.     {
  596.         $this->spryApiKey $spryApiKey;
  597.     }
  598.     /**
  599.      * @return string
  600.      */
  601.     public function getSmsSender(): string
  602.     {
  603.         return $this->smsSender;
  604.     }
  605.     /**
  606.      * @param string $smsSender
  607.      */
  608.     public function setSmsSender(string $smsSender): void
  609.     {
  610.         $this->smsSender $smsSender;
  611.     }
  612.     /**
  613.      * @return bool
  614.      */
  615.     public function isUseRatingMail(): bool
  616.     {
  617.         return $this->useRatingMail;
  618.     }
  619.     /**
  620.      * @param bool $useRatingMail
  621.      */
  622.     public function setUseRatingMail(bool $useRatingMail): void
  623.     {
  624.         $this->useRatingMail $useRatingMail;
  625.     }
  626.     /**
  627.      * @return string
  628.      */
  629.     public function getDatenschutzUrl(): string
  630.     {
  631.         return $this->datenschutzUrl;
  632.     }
  633.     /**
  634.      * @param string $datenschutzUrl
  635.      */
  636.     public function setDatenschutzUrl(string $datenschutzUrl): void
  637.     {
  638.         $this->datenschutzUrl $datenschutzUrl;
  639.     }
  640.     /**
  641.      * @return string
  642.      */
  643.     public function getMailReplyTo(): string
  644.     {
  645.         return $this->mailReplyTo;
  646.     }
  647.     /**
  648.      * @param string $mailReplyTo
  649.      */
  650.     public function setMailReplyTo(string $mailReplyTo): void
  651.     {
  652.         $this->mailReplyTo $mailReplyTo;
  653.     }
  654.     /**
  655.      * @return string
  656.      */
  657.     public function getMemberOrderExportText(): string
  658.     {
  659.         return $this->memberOrderExportText;
  660.     }
  661.     /**
  662.      * @param string $memberOrderExportText
  663.      */
  664.     public function setMemberOrderExportText(string $memberOrderExportText): void
  665.     {
  666.         $this->memberOrderExportText $memberOrderExportText;
  667.     }
  668.     public function isMemberOrderExportDetailed(): bool
  669.     {
  670.         return $this->memberOrderExportDetailed;
  671.     }
  672.     public function setMemberOrderExportDetailed(bool $memberOrderExportDetailed): void
  673.     {
  674.         $this->memberOrderExportDetailed $memberOrderExportDetailed;
  675.     }
  676.     public function getStripeApiKey(): ?string
  677.     {
  678.         return $this->stripeApiKey;
  679.     }
  680.     public function setStripeApiKey(?string $stripeApiKey): void
  681.     {
  682.         $this->stripeApiKey $stripeApiKey;
  683.     }
  684.     public function getStripePublicKey(): ?string
  685.     {
  686.         return $this->stripePublicKey;
  687.     }
  688.     public function setStripePublicKey(?string $stripePublicKey): void
  689.     {
  690.         $this->stripePublicKey $stripePublicKey;
  691.     }
  692.     public function getDashboardCategories(): array
  693.     {
  694.         return $this->dashboardCategories ?? [];
  695.     }
  696.     public function setDashboardCategories(array $dashboardCategories): void
  697.     {
  698.         $dashboardCategories array_filter($dashboardCategories, function($x) {
  699.             return $x !== PlatformClient::DEFAULT_DASHBOARD;
  700.         });
  701.         $this->dashboardCategories $dashboardCategories;
  702.     }
  703.     public function isApplicantTimeRidePayoutCalculatedPer15Min(): bool
  704.     {
  705.         return $this->applicantTimeRidePayoutCalculatedPer15Min;
  706.     }
  707.     public function setApplicantTimeRidePayoutCalculatedPer15Min(bool $applicantTimeRidePayoutCalculatedPer15Min): void
  708.     {
  709.         $this->applicantTimeRidePayoutCalculatedPer15Min $applicantTimeRidePayoutCalculatedPer15Min;
  710.     }
  711. }