Create PrivacyPolicy entity. Add links from Customer to PrivacyPolicy. #233
This commit is contained in:
parent
66adcdbdb5
commit
4a13c3e615
2 changed files with 172 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
116
src/Entity/PrivacyPolicy.php
Normal file
116
src/Entity/PrivacyPolicy.php
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="privacy_policy")
|
||||
*/
|
||||
class PrivacyPolicy
|
||||
{
|
||||
// unique id
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\Column(type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
// name
|
||||
/**
|
||||
* @ORM\Column(type="string", length=80)
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
// content
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
protected $content;
|
||||
|
||||
// link to mobile app customers
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Customer", mappedBy="privpol_mobile_app")
|
||||
*/
|
||||
protected $cust_mobile_app;
|
||||
|
||||
// link to third party customers
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Customer", mappedBy="privpol_third_party")
|
||||
*/
|
||||
protected $cust_third_party;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Customer", mappedBy="privpol_promo")
|
||||
*/
|
||||
protected $cust_promo;
|
||||
|
||||
public function getID()
|
||||
{
|
||||
return $this->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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue