src/AtechNet/CoreBundle/Entity/PickupPoint.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping\Column;
  4. use Doctrine\ORM\Mapping\Entity;
  5. use Doctrine\ORM\Mapping\JoinColumn;
  6. use Doctrine\ORM\Mapping\ManyToOne;
  7. use Doctrine\ORM\Mapping\OneToMany;
  8. use Doctrine\ORM\Mapping\OrderBy;
  9. use Doctrine\ORM\Mapping\Table as Table;
  10. /**
  11.  * PickupPoint
  12.  *
  13.  * @Table(name="pickup_point")
  14.  * @Entity(repositoryClass="App\AtechNet\CoreBundle\Repository\PickupPointRepository")
  15.  */
  16. class PickupPoint extends AbstractSignedEntity
  17. {
  18.     public const TYPE_ATECH_PARTNER = 0;
  19.     public const TYPE_GLS_POINT = 1;
  20.     public static function getTypeChoices()
  21.     {
  22.         return [
  23.             self::TYPE_ATECH_PARTNER => 'ATECH partner',
  24.             self::TYPE_GLS_POINT => 'GLS point',
  25.         ];
  26.     }
  27.     /**
  28.      * @var Customer
  29.      *
  30.      * @ManyToOne(targetEntity="Customer")
  31.      * @JoinColumn(name="partner_id", referencedColumnName="id", nullable=true)
  32.      */
  33.     private $partner;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @Column(name="title", type="text", length=128)
  38.      */
  39.     private $title;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @Column(name="street", type="text", length=64)
  44.      */
  45.     private $street;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @Column(name="city", type="text", length=64)
  50.      */
  51.     private $city;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @Column(name="zip", type="text", length=12)
  56.      */
  57.     private $zip;
  58.     /**
  59.      * @var string
  60.      *
  61.      * @Column(name="country", type="text", length=8)
  62.      */
  63.     private $country;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @Column(name="gps", type="text", length=24)
  68.      */
  69.     private $gps;
  70.     /**
  71.      * @var bool
  72.      *
  73.      * @Column(name="active", type="boolean")
  74.      */
  75.     private $active = true;
  76.     /**
  77.      * @var integer
  78.      *
  79.      * @Column(name="type", type="integer")
  80.      */
  81.     private $type = self::TYPE_ATECH_PARTNER;
  82.     /**
  83.      * @var bool
  84.      *
  85.      * @Column(name="locker", type="boolean")
  86.      */
  87.     private $locker = false;
  88.     /**
  89.      * @var string
  90.      *
  91.      * @Column(name="gls_id", type="text", length=128, nullable=true)
  92.      */
  93.     private $glsId;
  94.     /**
  95.      * @var ArrayCollection
  96.      *
  97.      * @OneToMany(targetEntity="Claim", mappedBy="pickupPoint", orphanRemoval=true)
  98.      * @OrderBy({"created" = "ASC"})
  99.      **/
  100.     private $claims;
  101.     /**
  102.      * @return Customer
  103.      */
  104.     public function getPartner()
  105.     {
  106.         return $this->partner;
  107.     }
  108.     /**
  109.      * @param Customer $partner
  110.      */
  111.     public function setPartner(Customer $partner)
  112.     {
  113.         $this->partner = $partner;
  114.     }
  115.     /**
  116.      * @return string
  117.      */
  118.     public function getTitle()
  119.     {
  120.         return $this->title;
  121.     }
  122.     /**
  123.      * @param string $title
  124.      */
  125.     public function setTitle($title)
  126.     {
  127.         $this->title = $title;
  128.     }
  129.     /**
  130.      * @return string
  131.      */
  132.     public function getStreet()
  133.     {
  134.         return $this->street;
  135.     }
  136.     /**
  137.      * @param string $street
  138.      */
  139.     public function setStreet($street)
  140.     {
  141.         $this->street = $street;
  142.     }
  143.     /**
  144.      * @return string
  145.      */
  146.     public function getCity()
  147.     {
  148.         return $this->city;
  149.     }
  150.     /**
  151.      * @param string $city
  152.      */
  153.     public function setCity($city)
  154.     {
  155.         $this->city = $city;
  156.     }
  157.     /**
  158.      * @return string
  159.      */
  160.     public function getZip()
  161.     {
  162.         return $this->zip;
  163.     }
  164.     /**
  165.      * @param string $zip
  166.      */
  167.     public function setZip($zip)
  168.     {
  169.         $this->zip = $zip;
  170.     }
  171.     /**
  172.      * @return string
  173.      */
  174.     public function getGps()
  175.     {
  176.         return $this->gps;
  177.     }
  178.     /**
  179.      * @param string $gps
  180.      */
  181.     public function setGps($gps)
  182.     {
  183.         $this->gps = $gps;
  184.     }
  185.     /**
  186.      * @return string
  187.      */
  188.     public function getCountry()
  189.     {
  190.         return $this->country;
  191.     }
  192.     /**
  193.      * @param string $country
  194.      */
  195.     public function setCountry($country)
  196.     {
  197.         $this->country = $country;
  198.     }
  199.     /**
  200.      * @return bool
  201.      */
  202.     public function isActive()
  203.     {
  204.         return $this->active;
  205.     }
  206.     /**
  207.      * @param bool $active
  208.      */
  209.     public function setActive($active)
  210.     {
  211.         $this->active = $active;
  212.     }
  213.     /**
  214.      * @return int
  215.      */
  216.     public function getType()
  217.     {
  218.         return $this->type;
  219.     }
  220.     /**
  221.      * @param int $type
  222.      */
  223.     public function setType($type)
  224.     {
  225.         $this->type = $type;
  226.     }
  227.     /**
  228.      * @return string
  229.      */
  230.     public function getGlsId()
  231.     {
  232.         return $this->glsId;
  233.     }
  234.     /**
  235.      * @param string $glsId
  236.      */
  237.     public function setGlsId($glsId)
  238.     {
  239.         $this->glsId = $glsId;
  240.     }
  241.     /**
  242.      * @return bool
  243.      */
  244.     public function isLocker()
  245.     {
  246.         return $this->locker;
  247.     }
  248.     /**
  249.      * @param bool $locker
  250.      */
  251.     public function setLocker($locker)
  252.     {
  253.         $this->locker = $locker;
  254.     }
  255. }