src/Entity/PointDeal.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. use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
  6. /**
  7.  * PointDeal
  8.  * @ORM\Table(name="point_deal")
  9.  * @ORM\Entity(repositoryClass="App\Repository\PointDealRepository")
  10.  * @ORM\HasLifecycleCallbacks
  11.  */
  12. class PointDeal {
  13.     /**
  14.      * @var integer
  15.      * @ORM\Column(name="pd_id", type="guid")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="NONE")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var \App\Entity\PointAcount
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\PointAcount")
  23.      * @ORM\JoinColumns({
  24.      *      @ORM\JoinColumn(name="pd_point_acount_fk", referencedColumnName="pa_id", onDelete="CASCADE")
  25.      * })
  26.      */
  27.     private $pointAcount;
  28.     /**
  29.      * @var \App\Entity\TypePointAcount
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\TypePointAcount")
  31.      * @ORM\JoinColumns({
  32.      *      @ORM\JoinColumn(name="pd_type_point_acount_fk", referencedColumnName="tpa_id", onDelete="CASCADE")
  33.      * })
  34.      */
  35.     private $typePointAcount;
  36.     /**
  37.      * @var \DateTime
  38.      * @ORM\Column(name="pd_deal_datetime", type="datetime")
  39.      */
  40.     private $dealDatetime;
  41.     /**
  42.      * @var decimal
  43.      * @ORM\Column(name="pd_deal_pts_amount",  type="decimal", precision=15, scale=2 )
  44.      */
  45.     private $dealPtsAmount;
  46.     /**
  47.      * @var \App\Entity\PtsAdquiRedemRules
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\PtsAdquiRedemRules")
  49.      * @ORM\JoinColumns({
  50.      *   @ORM\JoinColumn(name="pd_related_rule", referencedColumnName="ptar_id", onDelete="CASCADE")
  51.      * })
  52.      */
  53.     private $rule;
  54.     /**
  55.      * @var string
  56.      * @ORM\Column(name="pd_just_claim_once", type="boolean", nullable=true)
  57.      */
  58.     private $justClaimOnce false;
  59.     /**
  60.      * @var string
  61.      * @ORM\Column(name="pd_seed_evaluated_data", type="array", nullable=true)
  62.      */
  63.     private $seedData;
  64.     /**
  65.      * @var string
  66.      * @ORM\Column(name="pd_armor_response_data", type="array", nullable=true)
  67.      */
  68.     private $armorResponseData;
  69.     /**
  70.      * @var \DateTime
  71.      * @ORM\Column(name="pd_deal_cancelation_datetime", type="datetime", nullable=true)
  72.      */
  73.     private $dealCancelationDatetime;
  74.     /**
  75.      * @var \App\Entity\PointDeal
  76.      * @ORM\ManyToOne(targetEntity="App\Entity\PointDeal")
  77.      * @ORM\JoinColumns({
  78.      *   @ORM\JoinColumn(name="pd_cancelation_of", referencedColumnName="pd_id", nullable=true)
  79.      * })
  80.      */
  81.     private $cancelationOfRecord;
  82.     /**
  83.      * @var \App\Entity\AccountLicense
  84.      * @ORM\ManyToOne(targetEntity="App\Entity\AccountLicense")
  85.      * @ORM\JoinColumns({
  86.      *   @ORM\JoinColumn(name="pd_license", referencedColumnName="al_id", nullable=true, onDelete="CASCADE")
  87.      * })
  88.      */
  89.     private $license;
  90.     /**
  91.      * @var string
  92.      * @ORM\Column(name="pd_order_id", type="string", nullable=true)
  93.      */
  94.     private $order;
  95.     /**
  96.      * @return type
  97.      */
  98.     public function getOrder() {
  99.         return $this->order;
  100.     }
  101.     /**
  102.      * @param type $order
  103.      */
  104.     public function setOrder($order) {
  105.         $this->order $order;
  106.     }
  107.     /**
  108.      * @return \App\Entity\PointDeal
  109.      */
  110.     public function getCancelationOfRecord(): \App\Entity\PointDeal {
  111.         return $this->cancelationOfRecord;
  112.     }
  113.     /**
  114.      * @param \App\Entity\PointDeal $cancelationOfRecord
  115.      */
  116.     public function setCancelationOfRecord(\App\Entity\PointDeal $cancelationOfRecord null) {
  117.         $this->cancelationOfRecord $cancelationOfRecord;
  118.     }
  119.     /**
  120.      * @return \App\Entity\AccountLicense
  121.      */
  122.     public function getLicense(): \App\Entity\AccountLicense {
  123.         return $this->license;
  124.     }
  125.     /**
  126.      * @param \App\Entity\AccountLicense $license
  127.      */
  128.     public function setLicense(\App\Entity\AccountLicense $license null) {
  129.         $this->license $license;
  130.     }
  131.     /**
  132.      * @return type
  133.      */
  134.     public function getSeedData() {
  135.         return $this->seedData;
  136.     }
  137.     /**
  138.      * @return \DateTime
  139.      */
  140.     public function getDealCancelationDatetime() {
  141.         return $this->dealCancelationDatetime;
  142.     }
  143.     /**
  144.      * @param \DateTime $dealCancelationDatetime
  145.      */
  146.     public function setDealCancelationDatetime(\DateTime $dealCancelationDatetime null) {
  147.         $this->dealCancelationDatetime $dealCancelationDatetime;
  148.     }
  149.     /**
  150.      * @return type
  151.      */
  152.     public function getArmorResponseData() {
  153.         return $this->armorResponseData;
  154.     }
  155.     /**
  156.      * @param type $seedData
  157.      */
  158.     public function setSeedData($seedData) {
  159.         $this->seedData $seedData;
  160.     }
  161.     /**
  162.      * @param type $armorResponseData
  163.      */
  164.     public function setArmorResponseData($armorResponseData) {
  165.         $this->armorResponseData $armorResponseData;
  166.     }
  167.     /**
  168.      * @return type
  169.      */
  170.     public function getJustClaimOnce() {
  171.         return $this->justClaimOnce;
  172.     }
  173.     /**
  174.      * @param type $justClaimOnce
  175.      */
  176.     public function setJustClaimOnce($justClaimOnce) {
  177.         $this->justClaimOnce $justClaimOnce;
  178.     }
  179.     /**
  180.      * @return type
  181.      */
  182.     public function getId() {
  183.         return $this->id;
  184.     }
  185.     /**
  186.      * @return \App\Entity\PointAcount
  187.      */
  188.     public function getPointAcount(): \App\Entity\PointAcount {
  189.         return $this->pointAcount;
  190.     }
  191.     /**
  192.      * @return \App\Entity\TypePointAcount
  193.      */
  194.     public function getTypePointAcount(): \App\Entity\TypePointAcount {
  195.         return $this->typePointAcount;
  196.     }
  197.     /**
  198.      * @return \DateTime
  199.      */
  200.     public function getDealDatetime(): \DateTime {
  201.         return $this->dealDatetime;
  202.     }
  203.     /**
  204.      * @return type
  205.      */
  206.     public function getDealPtsAmount() {
  207.         return $this->dealPtsAmount;
  208.     }
  209.     /**
  210.      * @return \App\Entity\PtsAdquiRedemRules
  211.      */
  212.     public function getRule(): \App\Entity\PtsAdquiRedemRules {
  213.         return $this->rule;
  214.     }
  215.     /**
  216.      * @param type $id
  217.      */
  218.     public function setId($id) {
  219.         $this->id $id;
  220.     }
  221.     /**
  222.      * @param \App\Entity\PointAcount $pointAcount
  223.      */
  224.     public function setPointAcount(\App\Entity\PointAcount $pointAcount) {
  225.         $this->pointAcount $pointAcount;
  226.     }
  227.     /**
  228.      * @param \App\Entity\TypePointAcount $typePointAcount
  229.      */
  230.     public function setTypePointAcount(\App\Entity\TypePointAcount $typePointAcount) {
  231.         $this->typePointAcount $typePointAcount;
  232.     }
  233.     /**
  234.      * @param \DateTime $dealDatetime
  235.      */
  236.     public function setDealDatetime(\DateTime $dealDatetime null) {
  237.         $this->dealDatetime $dealDatetime;
  238.     }
  239.     /**
  240.      * @param type $dealPtsAmount
  241.      */
  242.     public function setDealPtsAmount($dealPtsAmount) {
  243.         $this->dealPtsAmount $dealPtsAmount;
  244.     }
  245.     /**
  246.      * @param \App\Entity\PtsAdquiRedemRules $rule
  247.      */
  248.     public function setRule(\App\Entity\PtsAdquiRedemRules $rule) {
  249.         $this->rule $rule;
  250.     }
  251.     /**
  252.      * @ORM\PrePersist
  253.      */
  254.     public function syncPrePersist() {
  255.         if (!$this->id) {
  256.             $newUUID UUIDGeneratorUtil::getUUIDv4();
  257.             $this->setId($newUUID);
  258.         }
  259.     }
  260.     /**
  261.      * @return type
  262.      */
  263.     public function showEverything() {
  264.         return get_object_vars($this);
  265.     }
  266. }