app/Entity/Schema/ORM/UserSettings.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Sq\Entity\Schema\ORM;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity]
  5. #[ORM\Table(name'user_settings')]
  6. class UserSettings
  7. {
  8.     /**
  9.      *
  10.      * @var int|null
  11.      */
  12.     #[ORM\Id]
  13.     #[ORM\Column(name'us_id'type'integer'nullablefalseoptions: ['unsigned' => true])]
  14.     #[ORM\GeneratedValue(strategy'AUTO')]
  15.     private $id;
  16.     /**
  17.      *
  18.      * @var User
  19.      */
  20.     #[ORM\OneToOne(targetEntityUser::class, inversedBy'settings'cascade: ['persist'])]
  21.     #[ORM\JoinColumn(name'us_u_id'referencedColumnName'u_id'nullablefalse)]
  22.     private $user;
  23.     /**
  24.      * @var bool
  25.      */
  26.     #[ORM\Column(name'us_online_marketing'type'boolean'nullablefalseoptions: ['default' => true])]
  27.     private $onlineMarketing true;
  28.     /**
  29.      * @var bool
  30.      */
  31.     #[ORM\Column(name'us_notify_product_updates'type'boolean'nullablefalseoptions: ['default' => true])]
  32.     private $notifyProductUpdates true;
  33.     /**
  34.      * @var bool
  35.      */
  36.     #[ORM\Column(name'us_notify_mailing_list'type'boolean'nullablefalseoptions: ['default' => true])]
  37.     private $notifyMailingList true;
  38.     /**
  39.      * @var bool
  40.      */
  41.     #[ORM\Column(name'us_notify_feature_added'type'boolean'nullablefalseoptions: ['default' => true])]
  42.     private $notifyFeatureAdded true;
  43.     /**
  44.      * @var bool
  45.      */
  46.     #[ORM\Column(name'us_notify_referral_credits'type'boolean'nullablefalseoptions: ['default' => true])]
  47.     private $notifyReferralCredits true;
  48.     public function __construct(User $user)
  49.     {
  50.         $this->user $user;
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getUser(): User
  57.     {
  58.         return $this->user;
  59.     }
  60.     public function hasOnlineMarketing(): bool
  61.     {
  62.         return $this->onlineMarketing;
  63.     }
  64.     public function setOnlineMarketing(bool $onlineMarketing): self
  65.     {
  66.         $this->onlineMarketing $onlineMarketing;
  67.         return $this;
  68.     }
  69.     public function isNotifyProductUpdatesEnabled(): bool
  70.     {
  71.         return $this->notifyProductUpdates;
  72.     }
  73.     public function setNotifyProductUpdatesEnabled(bool $notifyProductUpdates): self
  74.     {
  75.         $this->notifyProductUpdates $notifyProductUpdates;
  76.         return $this;
  77.     }
  78.     public function isNotifyMailingListEnabled(): bool
  79.     {
  80.         return $this->notifyMailingList;
  81.     }
  82.     public function setNotifyMailingListEnabled(bool $notifyMailingList): self
  83.     {
  84.         $this->notifyMailingList $notifyMailingList;
  85.         return $this;
  86.     }
  87.     public function isNotifyFeatureAddedEnabled(): bool
  88.     {
  89.         return $this->notifyFeatureAdded;
  90.     }
  91.     public function setNotifyFeatureAddedEnabled(bool $notifyFeatureAdded): self
  92.     {
  93.         $this->notifyFeatureAdded $notifyFeatureAdded;
  94.         return $this;
  95.     }
  96.     public function isNotifyReferralCreditsEnabled(): bool
  97.     {
  98.         return $this->notifyReferralCredits;
  99.     }
  100.     public function setNotifyReferralCreditsEnabled(bool $notifyReferralCredits): self
  101.     {
  102.         $this->notifyReferralCredits $notifyReferralCredits;
  103.         return $this;
  104.     }
  105. }