From 4a13c3e6155c9537c6f8a46ece48bef63322197a Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 23 Jul 2019 03:39:53 +0000 Subject: [PATCH] Create PrivacyPolicy entity. Add links from Customer to PrivacyPolicy. #233 --- src/Entity/Customer.php | 56 +++++++++++++++++ src/Entity/PrivacyPolicy.php | 116 +++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 src/Entity/PrivacyPolicy.php diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php index 08c39293..d1576621 100644 --- a/src/Entity/Customer.php +++ b/src/Entity/Customer.php @@ -147,6 +147,27 @@ class Customer */ protected $priv_promo; + /** + * @ORM\ManyToOne(targetEntity="PrivacyPolicy", inversedBy="cust_mobile_app") + * @ORM\JoinColumn(name="mobile_policy_id", referencedColumnName="id") + * @Assert\NotBlank() + */ + protected $privpol_mobile_app; + + /** + * @ORM\ManyToOne(targetEntity="PrivacyPolicy", inversedBy="cust_third_party") + * @ORM\JoinColumn(name="third_party_policy_id", referencedColumnName="id") + * @Assert\NotBlank() + */ + protected $privpol_third_party; + + /** + * @ORM\ManyToOne(targetEntity="PrivacyPolicy", inversedBy="cust_promo") + * @ORM\JoinColumn(name="promo_policy_id", referencedColumnName="id") + * @Assert\NotBlank() + */ + protected $privpol_promo; + public function __construct() { $this->numbers = new ArrayCollection(); @@ -433,4 +454,39 @@ class Customer { return $this->priv_promo; } + + public function setPrivacyPolicyMobile($privpol_mobile_app) + { + $this->privpol_mobile_app = $privpol_mobile_app; + return $this; + } + + public function getPrivacyPolicyMobile() + { + return $this->privpol_mobile_app; + } + + public function setPrivacyPolicyThirdParty($privpol_third_party) + { + $this->privpol_third_party = $privpol_third_party; + return $this; + } + + public function getPrivacyPolicyThirdParty() + { + return $this->privpol_third_party; + } + + public function setPrivacyPolicyPromo($privpol_promo) + { + $this->privpol_promo = $privpol_promo; + return $this; + } + + public function getPrivacyPolicyPromo() + { + return $this->privpol_promo; + } + + } diff --git a/src/Entity/PrivacyPolicy.php b/src/Entity/PrivacyPolicy.php new file mode 100644 index 00000000..b59ee551 --- /dev/null +++ b/src/Entity/PrivacyPolicy.php @@ -0,0 +1,116 @@ +id; + } + + public function setName($name) + { + $this->name = $name; + return $this; + } + + public function getName() + { + return $this->name; + } + + public function setContent($content) + { + $this->content = $content; + return $this; + } + + public function getContent() + { + return $this->content; + } + + public function setCustMobileApp($cust_mobile_app) + { + $this->cust_mobile_app = $cust_mobile_app; + return $this; + } + + public function getCustMobileApp() + { + return $this->cust_mobile_app; + } + + public function setCustThirdParty($cust_third_party) + { + $this->cust_third_party = $cust_third_party; + return $this; + } + + public function getCustThirdParty() + { + return $this->cust_third_party; + } + + public function setCustPromo($cust_promo) + { + $this->cust_promo = $cust_promo; + return $this; + } + + public function getCustPromo() + { + return $this->cust_promo; + } + + + + + +} +