app/proxy/entity/src/Eccube/Entity/Delivery.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14.     /**
  15.      * Delivery
  16.      *
  17.      * @ORM\Table(name="dtb_delivery")
  18.      * @ORM\InheritanceType("SINGLE_TABLE")
  19.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  20.      * @ORM\HasLifecycleCallbacks()
  21.      * @ORM\Entity(repositoryClass="Eccube\Repository\DeliveryRepository")
  22.      */
  23.     class Delivery extends \Eccube\Entity\AbstractEntity
  24.     {
  25.         /**
  26.          * @return string
  27.          */
  28.         public function __toString()
  29.         {
  30.             return (string) $this->name;
  31.         }
  32.         /**
  33.          * @var int
  34.          *
  35.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  36.          * @ORM\Id
  37.          * @ORM\GeneratedValue(strategy="IDENTITY")
  38.          */
  39.         private $id;
  40.         /**
  41.          * @var string|null
  42.          *
  43.          * @ORM\Column(name="name", type="string", length=255, nullable=true)
  44.          */
  45.         private $name;
  46.         /**
  47.          * @var string|null
  48.          *
  49.          * @ORM\Column(name="service_name", type="string", length=255, nullable=true)
  50.          */
  51.         private $service_name;
  52.         /**
  53.          * @var string|null
  54.          *
  55.          * @ORM\Column(name="description", type="string", length=4000, nullable=true)
  56.          */
  57.         private $description;
  58.         /**
  59.          * @var string|null
  60.          *
  61.          * @ORM\Column(name="confirm_url", type="string", length=4000, nullable=true)
  62.          */
  63.         private $confirm_url;
  64.         /**
  65.          * @var int|null
  66.          *
  67.          * @ORM\Column(name="sort_no", type="integer", nullable=true, options={"unsigned":true})
  68.          */
  69.         private $sort_no;
  70.         /**
  71.          * @var boolean
  72.          *
  73.          * @ORM\Column(name="visible", type="boolean", options={"default":true})
  74.          */
  75.         private $visible true;
  76.         /**
  77.          * @var \DateTime
  78.          *
  79.          * @ORM\Column(name="create_date", type="datetimetz")
  80.          */
  81.         private $create_date;
  82.         /**
  83.          * @var \DateTime
  84.          *
  85.          * @ORM\Column(name="update_date", type="datetimetz")
  86.          */
  87.         private $update_date;
  88.         /**
  89.          * @var \Doctrine\Common\Collections\Collection
  90.          *
  91.          * @ORM\OneToMany(targetEntity="Eccube\Entity\PaymentOption", mappedBy="Delivery", cascade={"persist","remove"})
  92.          */
  93.         private $PaymentOptions;
  94.         /**
  95.          * @var \Doctrine\Common\Collections\Collection
  96.          *
  97.          * @ORM\OneToMany(targetEntity="Eccube\Entity\DeliveryFee", mappedBy="Delivery", cascade={"persist","remove"})
  98.          */
  99.         private $DeliveryFees;
  100.         /**
  101.          * @var \Doctrine\Common\Collections\Collection
  102.          *
  103.          * @ORM\OneToMany(targetEntity="Eccube\Entity\DeliveryTime", mappedBy="Delivery", cascade={"persist","remove"})
  104.          * @ORM\OrderBy({
  105.          *     "sort_no"="ASC"
  106.          * })
  107.          */
  108.         private $DeliveryTimes;
  109.         /**
  110.          * @var \Eccube\Entity\Member
  111.          *
  112.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  113.          * @ORM\JoinColumns({
  114.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  115.          * })
  116.          */
  117.         private $Creator;
  118.         /**
  119.          * @var \Eccube\Entity\Master\SaleType
  120.          *
  121.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\SaleType")
  122.          * @ORM\JoinColumns({
  123.          *   @ORM\JoinColumn(name="sale_type_id", referencedColumnName="id")
  124.          * })
  125.          */
  126.         private $SaleType;
  127.         /**
  128.          * Constructor
  129.          */
  130.         public function __construct()
  131.         {
  132.             $this->PaymentOptions = new \Doctrine\Common\Collections\ArrayCollection();
  133.             $this->DeliveryFees = new \Doctrine\Common\Collections\ArrayCollection();
  134.             $this->DeliveryTimes = new \Doctrine\Common\Collections\ArrayCollection();
  135.         }
  136.         /**
  137.          * Get id.
  138.          *
  139.          * @return int
  140.          */
  141.         public function getId()
  142.         {
  143.             return $this->id;
  144.         }
  145.         /**
  146.          * Set name.
  147.          *
  148.          * @param string|null $name
  149.          *
  150.          * @return Delivery
  151.          */
  152.         public function setName($name null)
  153.         {
  154.             $this->name $name;
  155.             return $this;
  156.         }
  157.         /**
  158.          * Get name.
  159.          *
  160.          * @return string|null
  161.          */
  162.         public function getName()
  163.         {
  164.             return $this->name;
  165.         }
  166.         /**
  167.          * Set serviceName.
  168.          *
  169.          * @param string|null $serviceName
  170.          *
  171.          * @return Delivery
  172.          */
  173.         public function setServiceName($serviceName null)
  174.         {
  175.             $this->service_name $serviceName;
  176.             return $this;
  177.         }
  178.         /**
  179.          * Get serviceName.
  180.          *
  181.          * @return string|null
  182.          */
  183.         public function getServiceName()
  184.         {
  185.             return $this->service_name;
  186.         }
  187.         /**
  188.          * Set description.
  189.          *
  190.          * @param string|null $description
  191.          *
  192.          * @return Delivery
  193.          */
  194.         public function setDescription($description null)
  195.         {
  196.             $this->description $description;
  197.             return $this;
  198.         }
  199.         /**
  200.          * Get description.
  201.          *
  202.          * @return string|null
  203.          */
  204.         public function getDescription()
  205.         {
  206.             return $this->description;
  207.         }
  208.         /**
  209.          * Set confirmUrl.
  210.          *
  211.          * @param string|null $confirmUrl
  212.          *
  213.          * @return Delivery
  214.          */
  215.         public function setConfirmUrl($confirmUrl null)
  216.         {
  217.             $this->confirm_url $confirmUrl;
  218.             return $this;
  219.         }
  220.         /**
  221.          * Get confirmUrl.
  222.          *
  223.          * @return string|null
  224.          */
  225.         public function getConfirmUrl()
  226.         {
  227.             return $this->confirm_url;
  228.         }
  229.         /**
  230.          * Set sortNo.
  231.          *
  232.          * @param int|null $sortNo
  233.          *
  234.          * @return Delivery
  235.          */
  236.         public function setSortNo($sortNo null)
  237.         {
  238.             $this->sort_no $sortNo;
  239.             return $this;
  240.         }
  241.         /**
  242.          * Get sortNo.
  243.          *
  244.          * @return int|null
  245.          */
  246.         public function getSortNo()
  247.         {
  248.             return $this->sort_no;
  249.         }
  250.         /**
  251.          * Set createDate.
  252.          *
  253.          * @param \DateTime $createDate
  254.          *
  255.          * @return Delivery
  256.          */
  257.         public function setCreateDate($createDate)
  258.         {
  259.             $this->create_date $createDate;
  260.             return $this;
  261.         }
  262.         /**
  263.          * Get createDate.
  264.          *
  265.          * @return \DateTime
  266.          */
  267.         public function getCreateDate()
  268.         {
  269.             return $this->create_date;
  270.         }
  271.         /**
  272.          * Set updateDate.
  273.          *
  274.          * @param \DateTime $updateDate
  275.          *
  276.          * @return Delivery
  277.          */
  278.         public function setUpdateDate($updateDate)
  279.         {
  280.             $this->update_date $updateDate;
  281.             return $this;
  282.         }
  283.         /**
  284.          * Get updateDate.
  285.          *
  286.          * @return \DateTime
  287.          */
  288.         public function getUpdateDate()
  289.         {
  290.             return $this->update_date;
  291.         }
  292.         /**
  293.          * Add paymentOption.
  294.          *
  295.          * @param \Eccube\Entity\PaymentOption $paymentOption
  296.          *
  297.          * @return Delivery
  298.          */
  299.         public function addPaymentOption(PaymentOption $paymentOption)
  300.         {
  301.             $this->PaymentOptions[] = $paymentOption;
  302.             return $this;
  303.         }
  304.         /**
  305.          * Remove paymentOption.
  306.          *
  307.          * @param \Eccube\Entity\PaymentOption $paymentOption
  308.          *
  309.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  310.          */
  311.         public function removePaymentOption(PaymentOption $paymentOption)
  312.         {
  313.             return $this->PaymentOptions->removeElement($paymentOption);
  314.         }
  315.         /**
  316.          * Get paymentOptions.
  317.          *
  318.          * @return \Doctrine\Common\Collections\Collection
  319.          */
  320.         public function getPaymentOptions()
  321.         {
  322.             return $this->PaymentOptions;
  323.         }
  324.         /**
  325.          * Add deliveryFee.
  326.          *
  327.          * @param \Eccube\Entity\DeliveryFee $deliveryFee
  328.          *
  329.          * @return Delivery
  330.          */
  331.         public function addDeliveryFee(DeliveryFee $deliveryFee)
  332.         {
  333.             $this->DeliveryFees[] = $deliveryFee;
  334.             return $this;
  335.         }
  336.         /**
  337.          * Remove deliveryFee.
  338.          *
  339.          * @param \Eccube\Entity\DeliveryFee $deliveryFee
  340.          *
  341.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  342.          */
  343.         public function removeDeliveryFee(DeliveryFee $deliveryFee)
  344.         {
  345.             return $this->DeliveryFees->removeElement($deliveryFee);
  346.         }
  347.         /**
  348.          * Get deliveryFees.
  349.          *
  350.          * @return \Doctrine\Common\Collections\Collection
  351.          */
  352.         public function getDeliveryFees()
  353.         {
  354.             return $this->DeliveryFees;
  355.         }
  356.         /**
  357.          * Add deliveryTime.
  358.          *
  359.          * @param \Eccube\Entity\DeliveryTime $deliveryTime
  360.          *
  361.          * @return Delivery
  362.          */
  363.         public function addDeliveryTime(DeliveryTime $deliveryTime)
  364.         {
  365.             $this->DeliveryTimes[] = $deliveryTime;
  366.             return $this;
  367.         }
  368.         /**
  369.          * Remove deliveryTime.
  370.          *
  371.          * @param \Eccube\Entity\DeliveryTime $deliveryTime
  372.          *
  373.          * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  374.          */
  375.         public function removeDeliveryTime(DeliveryTime $deliveryTime)
  376.         {
  377.             return $this->DeliveryTimes->removeElement($deliveryTime);
  378.         }
  379.         /**
  380.          * Get deliveryTimes.
  381.          *
  382.          * @return \Doctrine\Common\Collections\Collection
  383.          */
  384.         public function getDeliveryTimes()
  385.         {
  386.             return $this->DeliveryTimes;
  387.         }
  388.         /**
  389.          * Set creator.
  390.          *
  391.          * @param \Eccube\Entity\Member|null $creator
  392.          *
  393.          * @return Delivery
  394.          */
  395.         public function setCreator(Member $creator null)
  396.         {
  397.             $this->Creator $creator;
  398.             return $this;
  399.         }
  400.         /**
  401.          * Get creator.
  402.          *
  403.          * @return \Eccube\Entity\Member|null
  404.          */
  405.         public function getCreator()
  406.         {
  407.             return $this->Creator;
  408.         }
  409.         /**
  410.          * Set saleType.
  411.          *
  412.          * @param \Eccube\Entity\Master\SaleType|null $saleType
  413.          *
  414.          * @return Delivery
  415.          */
  416.         public function setSaleType(Master\SaleType $saleType null)
  417.         {
  418.             $this->SaleType $saleType;
  419.             return $this;
  420.         }
  421.         /**
  422.          * Get saleType.
  423.          *
  424.          * @return \Eccube\Entity\Master\SaleType|null
  425.          */
  426.         public function getSaleType()
  427.         {
  428.             return $this->SaleType;
  429.         }
  430.         /**
  431.          * Set visible
  432.          *
  433.          * @param boolean $visible
  434.          *
  435.          * @return Delivery
  436.          */
  437.         public function setVisible($visible)
  438.         {
  439.             $this->visible $visible;
  440.             return $this;
  441.         }
  442.         /**
  443.          * Is the visibility visible?
  444.          *
  445.          * @return boolean
  446.          */
  447.         public function isVisible()
  448.         {
  449.             return $this->visible;
  450.         }
  451.     }