diff --git a/src/Entity/Warranty.php b/src/Entity/Warranty.php index 1cfa242c..49fa7f30 100644 --- a/src/Entity/Warranty.php +++ b/src/Entity/Warranty.php @@ -127,6 +127,13 @@ class Warranty */ protected $flag_activated; + // privacy policy + /** + * @ORM\OneToOne(targetEntity="PrivacyPolicy") + * @ORM\JoinColumn(name="warranty_privacy_policy", referencedColumnName="id", nullable=true) + */ + protected $privacy_policy; + public function __construct() { $this->date_create = new DateTime(); @@ -366,4 +373,23 @@ class Warranty { return $this->flag_activated; } + + public function hasPrivacyPolicy() + { + if ($this->privacy_policy == null) + return false; + + return true; + } + + public function setPrivacyPolicy(PrivacyPolicy $privacy_policy) + { + $this->privacy_policy = $privacy_policy; + return $this; + } + + public function getPrivacyPolicy() + { + return $this->privacy_policy; + } }