src/Entity/RestaurantLoyaltyConfiguration.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Util\UUIDGeneratorUtil;
  5. /**
  6.  * RestaurantLoyaltyConfiguration
  7.  * @ORM\Table(name="restaurant_loyalty_configuration")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  * @ORM\Entity(repositoryClass="App\Repository\RestaurantLoyaltyConfigurationRepository")
  10.  * @author aealan
  11.  */
  12. class RestaurantLoyaltyConfiguration {
  13.     /**
  14.      * @var integer
  15.      * @ORM\Column(name="rlc_id", type="guid")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="NONE")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var \DateTime
  22.      * @ORM\Column(name="rlc_created", type="datetime")
  23.      */
  24.     private $dateCreated;
  25.     /**
  26.      * @var string
  27.      * @ORM\Column(name="rlc_local_points", type="boolean", nullable=true)
  28.      */
  29.     private $useLocalPoints;
  30.     
  31.     /**
  32.      * @var string
  33.      * @ORM\Column(name="rlc_global_points", type="boolean", nullable=true)
  34.      */
  35.     private $useGlobalPoints;
  36.     
  37.     /**
  38.      * @var string
  39.      * @ORM\Column(name="rlc_earn_points_with_points", type="boolean", nullable=true)
  40.      */
  41.     private $earnPointsInPurchaseWithPoints;
  42.     
  43.     /**
  44.      * @var integer
  45.      * @ORM\Column(name="rlc_minimum_exchange", type="integer", length=4, options={"default":"1"})
  46.      */
  47.     private $minimumPointAmountToExchange 1;
  48.     
  49.     /**
  50.      * @var \App\Entity\AccountLicense
  51.      * @ORM\ManyToOne(targetEntity="App\Entity\AccountLicense")
  52.      * @ORM\JoinColumns({
  53.      *   @ORM\JoinColumn(name="rlc_license", referencedColumnName="al_id", nullable=true, onDelete="CASCADE")
  54.      * })
  55.      */
  56.     private $license;
  57.     
  58.     /**
  59.      * @return type
  60.      */
  61.     public function getId() {
  62.         return $this->id;
  63.     }
  64.     /**
  65.      * @return type
  66.      */
  67.     public function getEarnPointsInPurchaseWithPoints() {
  68.         return $this->earnPointsInPurchaseWithPoints;
  69.     }
  70.     /**
  71.      * @param type $earnPointsInPurchaseWithPoints
  72.      */
  73.     public function setEarnPointsInPurchaseWithPoints($earnPointsInPurchaseWithPoints) {
  74.         $this->earnPointsInPurchaseWithPoints $earnPointsInPurchaseWithPoints;
  75.     }
  76.         
  77.     /**
  78.      * @return type
  79.      */
  80.     public function getLicense() {
  81.         return $this->license;
  82.     }
  83.     /**
  84.      * @param \App\Entity\AccountLicense $license
  85.      */
  86.     public function setLicense(\App\Entity\AccountLicense $license) {
  87.         $this->license $license;
  88.     }
  89.     /**
  90.      * @return type
  91.      */
  92.     public function getDateCreated() {
  93.         return $this->dateCreated;
  94.     }
  95.     /**
  96.      * @return type
  97.      */
  98.     public function getUseLocalPoints() {
  99.         return $this->useLocalPoints;
  100.     }
  101.     /**
  102.      * @return type
  103.      */
  104.     public function getUseGlobalPoints() {
  105.         return $this->useGlobalPoints;
  106.     }
  107.     /**
  108.      * @return type
  109.      */
  110.     public function getMinimumPointAmountToExchange() {
  111.         return $this->minimumPointAmountToExchange;
  112.     }
  113.     /**
  114.      * @param type $id
  115.      */
  116.     public function setId($id) {
  117.         $this->id $id;
  118.     }
  119.     /**
  120.      * @param \DateTime $dateCreated
  121.      */
  122.     public function setDateCreated(\DateTime $dateCreated null) {
  123.         $this->dateCreated $dateCreated;
  124.     }
  125.     /**
  126.      * @param type $useLocalPoints
  127.      */
  128.     public function setUseLocalPoints($useLocalPoints) {
  129.         $this->useLocalPoints $useLocalPoints;
  130.     }
  131.     /**
  132.      * @param type $useGlobalPoints
  133.      */
  134.     public function setUseGlobalPoints($useGlobalPoints) {
  135.         $this->useGlobalPoints $useGlobalPoints;
  136.     }
  137.     /**
  138.      * @param type $minimumPointAmountToExchange
  139.      */
  140.     public function setMinimumPointAmountToExchange($minimumPointAmountToExchange) {
  141.         $this->minimumPointAmountToExchange $minimumPointAmountToExchange;
  142.     }
  143.     /**
  144.      * @ORM\PrePersist
  145.      */
  146.     public function syncPrePersist() {
  147.         if (!$this->id) {
  148.             $newUUID UUIDGeneratorUtil::getUUIDv4();
  149.             $this->setId($newUUID);
  150.         }
  151.     }
  152.     /**
  153.      * @return type
  154.      */
  155.     public function showEverything() {
  156.         return get_object_vars($this);
  157.     }
  158. }