<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Util\UUIDGeneratorUtil;
/**
* RestaurantLoyaltyConfiguration
* @ORM\Table(name="restaurant_loyalty_configuration")
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="App\Repository\RestaurantLoyaltyConfigurationRepository")
* @author aealan
*/
class RestaurantLoyaltyConfiguration {
/**
* @var integer
* @ORM\Column(name="rlc_id", type="guid")
* @ORM\Id
* @ORM\GeneratedValue(strategy="NONE")
*/
private $id;
/**
* @var \DateTime
* @ORM\Column(name="rlc_created", type="datetime")
*/
private $dateCreated;
/**
* @var string
* @ORM\Column(name="rlc_local_points", type="boolean", nullable=true)
*/
private $useLocalPoints;
/**
* @var string
* @ORM\Column(name="rlc_global_points", type="boolean", nullable=true)
*/
private $useGlobalPoints;
/**
* @var string
* @ORM\Column(name="rlc_earn_points_with_points", type="boolean", nullable=true)
*/
private $earnPointsInPurchaseWithPoints;
/**
* @var integer
* @ORM\Column(name="rlc_minimum_exchange", type="integer", length=4, options={"default":"1"})
*/
private $minimumPointAmountToExchange = 1;
/**
* @var \App\Entity\AccountLicense
* @ORM\ManyToOne(targetEntity="App\Entity\AccountLicense")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="rlc_license", referencedColumnName="al_id", nullable=true, onDelete="CASCADE")
* })
*/
private $license;
/**
* @return type
*/
public function getId() {
return $this->id;
}
/**
* @return type
*/
public function getEarnPointsInPurchaseWithPoints() {
return $this->earnPointsInPurchaseWithPoints;
}
/**
* @param type $earnPointsInPurchaseWithPoints
*/
public function setEarnPointsInPurchaseWithPoints($earnPointsInPurchaseWithPoints) {
$this->earnPointsInPurchaseWithPoints = $earnPointsInPurchaseWithPoints;
}
/**
* @return type
*/
public function getLicense() {
return $this->license;
}
/**
* @param \App\Entity\AccountLicense $license
*/
public function setLicense(\App\Entity\AccountLicense $license) {
$this->license = $license;
}
/**
* @return type
*/
public function getDateCreated() {
return $this->dateCreated;
}
/**
* @return type
*/
public function getUseLocalPoints() {
return $this->useLocalPoints;
}
/**
* @return type
*/
public function getUseGlobalPoints() {
return $this->useGlobalPoints;
}
/**
* @return type
*/
public function getMinimumPointAmountToExchange() {
return $this->minimumPointAmountToExchange;
}
/**
* @param type $id
*/
public function setId($id) {
$this->id = $id;
}
/**
* @param \DateTime $dateCreated
*/
public function setDateCreated(\DateTime $dateCreated = null) {
$this->dateCreated = $dateCreated;
}
/**
* @param type $useLocalPoints
*/
public function setUseLocalPoints($useLocalPoints) {
$this->useLocalPoints = $useLocalPoints;
}
/**
* @param type $useGlobalPoints
*/
public function setUseGlobalPoints($useGlobalPoints) {
$this->useGlobalPoints = $useGlobalPoints;
}
/**
* @param type $minimumPointAmountToExchange
*/
public function setMinimumPointAmountToExchange($minimumPointAmountToExchange) {
$this->minimumPointAmountToExchange = $minimumPointAmountToExchange;
}
/**
* @ORM\PrePersist
*/
public function syncPrePersist() {
if (!$this->id) {
$newUUID = UUIDGeneratorUtil::getUUIDv4();
$this->setId($newUUID);
}
}
/**
* @return type
*/
public function showEverything() {
return get_object_vars($this);
}
}