![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/NotificationBundle/Entity/ |
<?php namespace Mautic\NotificationBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder; use Mautic\LeadBundle\Entity\Lead; class PushID { /** * @var int */ private $id; /** * @var Lead|null */ private $lead; /** * @var string */ private $pushID; /** * @var bool */ private $enabled; /** * @var bool */ private $mobile; public static function loadMetadata(ORM\ClassMetadata $metadata): void { $builder = new ClassMetadataBuilder($metadata); $builder->setTable('push_ids') ->setCustomRepositoryClass(PushIDRepository::class); $builder->createField('id', 'integer') ->makePrimaryKey() ->generatedValue() ->build(); $builder->createField('pushID', 'string') ->columnName('push_id') ->nullable(false) ->build(); $builder->createManyToOne('lead', Lead::class) ->addJoinColumn('lead_id', 'id', true, false, 'SET NULL') ->inversedBy('pushIds') ->build(); $builder->createField('enabled', 'boolean')->build(); $builder->createField('mobile', 'boolean')->build(); } /** * @return int */ public function getId() { return $this->id; } /** * @param int $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * @return Lead */ public function getLead() { return $this->lead; } /** * @return $this */ public function setLead(Lead $lead) { $this->lead = $lead; return $this; } /** * @return string */ public function getPushID() { return $this->pushID; } /** * @param string $pushID * * @return $this */ public function setPushID($pushID) { $this->pushID = $pushID; return $this; } /** * @return bool */ public function isEnabled() { return $this->enabled; } /** * @return $this */ public function setEnabled($enabled) { $this->enabled = $enabled; return $this; } /** * @return bool */ public function isMobile() { return $this->mobile; } /** * @param bool $mobile * * @return $this */ public function setMobile($mobile) { $this->mobile = $mobile; return $this; } }