src/Entity/Vista/LoyaltyMember.php line 23

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Vista;
  4. use App\Entity\Local\PushNotificationSubscription;
  5. use App\Entity\Local\Restrictions;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Lexik\Bundle\JWTAuthenticationBundle\Security\User\JWTUserInterface;
  8. use Nelmio\ApiDocBundle\Annotation\Model;
  9. use Swagger\Annotations as SWG;
  10. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  11. use Symfony\Component\Security\Core\User\UserInterface;
  12. use Symfony\Component\Serializer\Annotation\Groups;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. /**
  15.  * @ORM\Entity(repositoryClass="App\Repository\UserRepositoryORMDecorator")
  16.  * @UniqueEntity("email", groups={"signUp", "update"})
  17.  * @ORM\Table(name="user")
  18.  * @ORM\HasLifecycleCallbacks()
  19.  */
  20. class LoyaltyMember implements UserInterfaceJWTUserInterface, \Serializable
  21. {
  22.     /**
  23.      * @ORM\Id()
  24.      * @ORM\Column(type="guid")
  25.      * @ORM\GeneratedValue(strategy="UUID")
  26.      * @var string|null
  27.      */
  28.     protected $id;
  29.     /**
  30.      * @ORM\Column(type="string", nullable=true)
  31.      * @var string|null
  32.      */
  33.     protected $userSessionId;
  34.     /**
  35.      * Original
  36.      *
  37.      * @Groups({"update-preferences"})
  38.      * @ORM\Column(nullable=true, type="string")
  39.      * @var string|null
  40.      */
  41.     protected $memberId;
  42.     /**
  43.      * Original
  44.      *
  45.      * @Groups({"signUp", "update"})
  46.      * @Assert\NotBlank(groups={"signUp", "update"})
  47.      * @ORM\Column(type="string")
  48.      * @var string|null
  49.      */
  50.     protected $firstName;
  51.     /**
  52.      * Original
  53.      *
  54.      * @Groups({"signUp", "update"})
  55.      * @Assert\NotBlank(groups={"signUp", "update"})
  56.      * @ORM\Column(type="string")
  57.      * @var string|null
  58.      */
  59.     protected $lastName;
  60.     /**
  61.      * Original
  62.      *
  63.      * @ORM\Column(nullable=true, type="string")
  64.      * @var string|null
  65.      */
  66.     protected $fullName;
  67.     /**
  68.      * Original
  69.      *
  70.      * @ORM\Column(nullable=true, type="string")
  71.      * @var string|null
  72.      */
  73.     protected $cardNumber;
  74.     /**
  75.      * Original
  76.      *
  77.      * @Groups("optional")
  78.      * @ORM\Column(nullable=true, type="string")
  79.      * @var string|null
  80.      */
  81.     protected $mobilePhone;
  82.     /**
  83.      * @Groups("optional")
  84.      * @ORM\Column(nullable=true, type="string")
  85.      * @var string|null
  86.      */
  87.     protected $homePhone;
  88.     /**
  89.      * @Groups("optional")
  90.      * @ORM\Column(nullable=true, type="string")
  91.      * @var string|null
  92.      */
  93.     protected $appleUserId;
  94.     /**
  95.      * @Groups("optional")
  96.      * @ORM\Column(nullable=true, type="string")
  97.      * @var string|null
  98.      */
  99.     protected $appleEmailAddress;
  100.     /**
  101.      * Original
  102.      *
  103.      * @Groups({"signUp", "login", "reset-password"})
  104.      * @Assert\Email(groups={"login", "signUp", "reset-password", "update"})
  105.      * @Assert\NotBlank(groups={"login", "signUp", "reset-password", "update"})
  106.      *
  107.      * @ORM\Column(type="string", unique=true)
  108.      * @var string|null
  109.      */
  110.     protected $email;
  111.     /**
  112.      * Original
  113.      *
  114.      * @Groups({"update-preferences"})
  115.      * @ORM\Column(type="string")
  116.      * @var string|null
  117.      */
  118.     protected $clubID;
  119.     /**
  120.      * Original
  121.      *
  122.      * @SWG\Property(type="array", @SWG\Items(ref=@Model(type=\App\Entity\Vista\MemberBalance::class)))
  123.      * @ORM\Column(type="array")
  124.      * @var MemberBalance[]|null
  125.      */
  126.     protected $balanceList;
  127.     /**
  128.      * Original
  129.      *
  130.      * @ORM\Column(type="string", nullable=true)
  131.      * @var string|null
  132.      */
  133.     protected $userName;
  134.     /**
  135.      * Original
  136.      *
  137.      * @Groups({"signUp", "login"})
  138.      * @Assert\NotBlank(groups={"login", "signUp"})
  139.      * @Assert\Length(min="4", groups={"signUp"})
  140.      * @Assert\Regex(
  141.      *     pattern="/^[A-Za-zÀ-ž0-9!§$%&\/()=?\,.\-_:;+*~|@#$%]+$/",
  142.      *     htmlPattern="/^[A-Za-zÀ-ž0-9!§$%&\/()=?\,.\-_:;+*~|@#$%]+$/",
  143.      *     groups={"login", "signUp", "update"})
  144.      * @var string|null
  145.      */
  146.     protected $password;
  147.     /**
  148.      * Original
  149.      *
  150.      * @var Restrictions|null
  151.      */
  152.     protected $restrictions;
  153.     /**
  154.      * Original
  155.      *
  156.      * @ORM\Column(nullable=true, type="string")
  157.      * @var string|null
  158.      */
  159.     protected $middleName;
  160.     /**
  161.      * Original
  162.      *
  163.      * @Groups({"optional"})
  164.      * @ORM\Column(nullable=true, type="string")
  165.      * @var string|null
  166.      */
  167.     protected $address1;
  168.     /**
  169.      * Original
  170.      *
  171.      * @Groups({"optional"})
  172.      * @ORM\Column(nullable=true, type="string")
  173.      * @var string|null
  174.      */
  175.     protected $state;
  176.     /**
  177.      * Original
  178.      *
  179.      * @ORM\Column(nullable=true, type="string")
  180.      * @Groups({"optional"})
  181.      * @var string|null
  182.      */
  183.     protected $city;
  184.     /**
  185.      * Original
  186.      *
  187.      * @ORM\Column(nullable=true, type="string")
  188.      * @var string|null
  189.      */
  190.     protected $zipCode;
  191.     /**
  192.      * Original
  193.      *
  194.      * @ORM\Column(nullable=true, type="boolean")
  195.      * @Groups({"optional", "update-preferences"})
  196.      * @var boolean|null
  197.      */
  198.     protected $sendNewsletter;
  199.     /**
  200.      * Original
  201.      *
  202.      * @ORM\Column(nullable=true, type="integer")
  203.      * @var integer|null
  204.      */
  205.     protected $educationLevel;
  206.     /**
  207.      * Original
  208.      *
  209.      * @ORM\Column(nullable=true, type="integer")
  210.      * @var integer|null
  211.      */
  212.     protected $householdIncome;
  213.     /**
  214.      * Original
  215.      *
  216.      * @ORM\Column(nullable=true, type="integer")
  217.      * @var integer|null
  218.      */
  219.     protected $personsInHousehold;
  220.     /**
  221.      * Changed from string|null
  222.      *
  223.      * @Groups({"signUp", "update"})
  224.      * @ORM\Column(nullable=true, type="datetime_immutable")
  225.      * @var \DateTimeImmutable|null
  226.      */
  227.     protected $dateOfBirth;
  228.     /**
  229.      * Original
  230.      *
  231.      * @ORM\Column(nullable=true, type="string")
  232.      * @var string|null
  233.      */
  234.     protected $status;
  235.     /**
  236.      * Original
  237.      *
  238.      * @ORM\Column(nullable=true, type="string")
  239.      * @var string|null
  240.      */
  241.     protected $suburb;
  242.     /**
  243.      * Original
  244.      *
  245.      * @ORM\Column(nullable=true, type="string")
  246.      * @Groups({"signUp", "update"})
  247.      * @var string|null
  248.      */
  249.     protected $gender;
  250.     /**
  251.      * Original
  252.      *
  253.      * @ORM\Column(nullable=true, type="integer")
  254.      * @var integer|null
  255.      */
  256.     protected $pickupComplex;
  257.     /**
  258.      * Original
  259.      *
  260.      * @ORM\Column(nullable=true, type="integer")
  261.      * @var integer|null
  262.      */
  263.     protected $preferredComplex;
  264.     /**
  265.      * Original
  266.      *
  267.      * @SWG\Property(type="array", @SWG\Items(type="integer"))
  268.      * @ORM\Column(nullable=true, type="array")
  269.      * @Groups({"signUp", "update", "update-preferences"})
  270.      * @var integer[]|null
  271.      */
  272.     protected $preferredComplexList;
  273.     /**
  274.      * Original
  275.      *
  276.      * @SWG\Property(type="array", @SWG\Items(type="integer"))
  277.      * @ORM\Column(nullable=true, type="array")
  278.      * @Groups({"update-preferences"})
  279.      * @var integer[]|null
  280.      */
  281.     protected $preferenceList;
  282.     /**
  283.      * @Groups({"optional"})
  284.      * @ORM\Column(type="boolean", nullable=true)
  285.      * @var boolean|null
  286.      */
  287.     protected $opera;
  288.     /**
  289.      * @ORM\Column(type="boolean", nullable=true)
  290.      * @var boolean|null
  291.      */
  292.     protected $familyClubAndChildrenActions;
  293.     /**
  294.      * @Groups({"optional"})
  295.      * @ORM\Column(type="boolean", nullable=true)
  296.      * @var boolean|null
  297.      */
  298.     protected $remembranceEventsService;
  299.     /**
  300.      * Original
  301.      *
  302.      * @ORM\Column(nullable=true, type="string")
  303.      * @var string|null
  304.      */
  305.     protected $clubName;
  306.     /**
  307.      * Original
  308.      *
  309.      * @Groups({"optional", "update-preferences"})
  310.      * @ORM\Column(nullable=true, type="boolean")
  311.      * @var boolean|null
  312.      */
  313.     protected $contactByThirdParty;
  314.     /**
  315.      * Changed from string|null
  316.      *
  317.      * @ORM\Column(nullable=true, type="datetime")
  318.      * @var \DateTime|null
  319.      */
  320.     protected $expiryDate;
  321.     /**
  322.      * Original
  323.      *
  324.      * @Groups({"optional", "update-preferences"})
  325.      * @ORM\Column(nullable=true, type="boolean")
  326.      * @var boolean|null
  327.      */
  328.     protected $wishToReceiveSMS;
  329.     /**
  330.      * Original
  331.      *
  332.      * @ORM\Column(nullable=true, type="string")
  333.      * @var string|null
  334.      */
  335.     protected $workZipCode;
  336.     /**
  337.      * Original
  338.      *
  339.      * @SWG\Property(type="array", @SWG\Items(type="string"))
  340.      * @ORM\Column(nullable=true, type="array")
  341.      * @var string[]|null
  342.      */
  343.     protected $cardList;
  344.     /**
  345.      * Original
  346.      *
  347.      * @Groups({"update-preferences"})
  348.      * @SWG\Property(type="array", @SWG\Items(type="integer"))
  349.      * @ORM\Column(nullable=true, type="array")
  350.      * @var integer[]|null
  351.      */
  352.     protected $preferredGenres;
  353.     /**
  354.      * Original
  355.      *
  356.      * @ORM\Column(nullable=true, type="integer")
  357.      * @var integer|null
  358.      */
  359.     protected $occupation;
  360.     /**
  361.      * Original
  362.      *
  363.      * @ORM\Column(nullable=true, type="string")
  364.      * @var string|null
  365.      */
  366.     protected $maritalStatus;
  367.     /**
  368.      * Original
  369.      *
  370.      * @ORM\Column(nullable=true, type="string")
  371.      * @var string|null
  372.      */
  373.     protected $mailingFrequency;
  374.     /**
  375.      * Original
  376.      *
  377.      * @ORM\Column(nullable=true, type="string")
  378.      * @var string|null
  379.      */
  380.     protected $pin;
  381.     /**
  382.      * Original
  383.      *
  384.      * @SWG\Property(type="array", @SWG\Items(ref=@Model(type=\App\Entity\Local\ValueObject\ExpiryPoint::class)))
  385.      * @ORM\Column(nullable=true, type="array")
  386.      * @var \App\Entity\Local\ValueObject\ExpiryPoint[]|null
  387.      */
  388.     protected $expiryPointsList;
  389.     /**
  390.      * Original
  391.      *
  392.      * @ORM\Column(nullable=true, type="integer")
  393.      * @var integer|null
  394.      */
  395.     protected $memberLevelId;
  396.     /**
  397.      * Original
  398.      *
  399.      * @ORM\Column(nullable=true, type="string")
  400.      * @var string|null
  401.      */
  402.     protected $memberLevelName;
  403.     /**
  404.      * Changed from string|null
  405.      *
  406.      * @ORM\Column(nullable=true, type="datetime")
  407.      * @var \DateTime|null
  408.      */
  409.     protected $loyaltySessionExpiry;
  410.     /**
  411.      * @ORM\Column(nullable=true, type="text")
  412.      * @var string|null
  413.      */
  414.     protected $loyaltySessionToken;
  415.     /**
  416.      * Original
  417.      *
  418.      * @ORM\Column(nullable=true, type="boolean")
  419.      * @var boolean|null
  420.      */
  421.     protected $giftCard;
  422.     /**
  423.      * Changed from float|null
  424.      *
  425.      * @SWG\Property(type="string")
  426.      * @ORM\Column(nullable=true, type="decimal", precision=10, scale=2)
  427.      * @var float|null
  428.      */
  429.     protected $giftCardBalance;
  430.     /**
  431.      * Changed from string|null
  432.      *
  433.      * @ORM\Column(nullable=true, type="datetime")
  434.      * @var \DateTime|null
  435.      */
  436.     protected $isBannedFromMakingUnpaidBookingsUntil;
  437.     /**
  438.      * Original
  439.      *
  440.      * @ORM\Column(nullable=true, type="boolean")
  441.      * @var boolean|null
  442.      */
  443.     protected $membershipActivated;
  444.     /**
  445.      * Original
  446.      *
  447.      * @ORM\Column(nullable=true, type="string")
  448.      * @var string|null
  449.      */
  450.     protected $memberItemId;
  451.     /**
  452.      * Original
  453.      *
  454.      * @ORM\Column(nullable=true, type="string")
  455.      * @var string|null
  456.      */
  457.     protected $externalID;
  458.     /**
  459.      * Original
  460.      *
  461.      * @ORM\Column(nullable=true, type="string")
  462.      * @var string|null
  463.      */
  464.     protected $nationalID;
  465.     /**
  466.      * Original
  467.      *
  468.      * @Groups({"optional"})
  469.      * @ORM\Embedded(class="\App\Entity\Local\PushNotificationSubscription")
  470.      * @var PushNotificationSubscription|null
  471.      */
  472.     protected $pushNotificationSubscription;
  473.     /**
  474.      * Original
  475.      *
  476.      * @ORM\Column(type="boolean", nullable=true)
  477.      * @var boolean|null
  478.      */
  479.     protected $isAnonymous;
  480.     /**
  481.      * Original
  482.      *
  483.      * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  484.      * @var boolean|null
  485.      */
  486.     protected $validatedFiscaliazionLaw;
  487.     /**
  488.      * Original
  489.      *
  490.      * @ORM\Column(type="string", nullable=true)
  491.      * @var string|null
  492.      */
  493.     protected $memberLanguageIETFCode;
  494.     /**
  495.      * @ORM\Column(type="datetime_immutable", nullable=true)
  496.      * @var \DateTimeImmutable
  497.      */
  498.     protected $modifiedAt;
  499.     /**
  500.      * @ORM\Column(type="datetime_immutable", nullable=true)
  501.      * @var \DateTimeImmutable
  502.      */
  503.     protected $createdAt;
  504.     /**
  505.      * @param       $username
  506.      * @param array $payload
  507.      *
  508.      * @return LoyaltyMember
  509.      */
  510.     public static function createFromPayload($username, array $payload)
  511.     {
  512.         return (new self())
  513.             ->setMemberId($payload['memberId'])
  514.             ->setEmail($payload['email'])
  515.             ->setUserSessionId($payload['userSessionId'])
  516.             ->setUsername($payload['username'])
  517.             ->setClubID($payload['clubID']);
  518.     }
  519.     /**
  520.      * @return string[]
  521.      */
  522.     public function getRoles()
  523.     {
  524.         return ['ROLE_MOBILE_CLIENT'];
  525.     }
  526.     /**
  527.      * {@inheritDoc}
  528.      */
  529.     public function getSalt()
  530.     {
  531.         return '';
  532.     }
  533.     public function eraseCredentials()
  534.     {
  535.     }
  536.     public function serialize()
  537.     {
  538.         return serialize([
  539.             $this->id,
  540.             $this->email,
  541.             $this->userSessionId
  542.         ]);
  543.     }
  544.     public function unserialize($serialized)
  545.     {
  546.         list(
  547.             $this->id,
  548.             $this->email,
  549.             $this->userSessionId
  550.             ) = unserialize($serialized, ['allowed_classes' => false]);
  551.     }
  552.     /**
  553.      * @return string|null
  554.      */
  555.     public function getId(): ?string
  556.     {
  557.         return $this->id;
  558.     }
  559.     /**
  560.      * @param string|null $id
  561.      * @return LoyaltyMember
  562.      */
  563.     public function setId(?string $id): LoyaltyMember
  564.     {
  565.         $this->id $id;
  566.         return $this;
  567.     }
  568.     /**
  569.      * @return string|null
  570.      */
  571.     public function getUserSessionId(): ?string
  572.     {
  573.         return $this->userSessionId;
  574.     }
  575.     /**
  576.      * @param string|null $userSessionId
  577.      * @return LoyaltyMember
  578.      */
  579.     public function setUserSessionId(?string $userSessionId): LoyaltyMember
  580.     {
  581.         $this->userSessionId $userSessionId;
  582.         /**
  583.          * @var LoyaltyMember $self
  584.          */
  585.         return $this;
  586.     }
  587.     /**
  588.      * @return string|null
  589.      */
  590.     public function getMemberId(): ?string
  591.     {
  592.         return $this->memberId;
  593.     }
  594.     /**
  595.      * @param string|null $memberId
  596.      * @return LoyaltyMember
  597.      */
  598.     public function setMemberId(?string $memberId): LoyaltyMember
  599.     {
  600.         $this->memberId $memberId;
  601.         return $this;
  602.     }
  603.     /**
  604.      * @return string|null
  605.      */
  606.     public function getFirstName(): ?string
  607.     {
  608.         return $this->firstName;
  609.     }
  610.     /**
  611.      * @param string|null $firstName
  612.      * @return LoyaltyMember
  613.      */
  614.     public function setFirstName(?string $firstName): LoyaltyMember
  615.     {
  616.         $this->firstName $firstName;
  617.         return $this;
  618.     }
  619.     /**
  620.      * @return string|null
  621.      */
  622.     public function getLastName(): ?string
  623.     {
  624.         return $this->lastName;
  625.     }
  626.     /**
  627.      * @param string|null $lastName
  628.      * @return LoyaltyMember
  629.      */
  630.     public function setLastName(?string $lastName): LoyaltyMember
  631.     {
  632.         $this->lastName $lastName;
  633.         return $this;
  634.     }
  635.     /**
  636.      * @return string|null
  637.      */
  638.     public function getFullName(): ?string
  639.     {
  640.         return $this->fullName;
  641.     }
  642.     /**
  643.      * @param string|null $fullName
  644.      * @return LoyaltyMember
  645.      */
  646.     public function setFullName(?string $fullName): LoyaltyMember
  647.     {
  648.         $this->fullName $fullName;
  649.         return $this;
  650.     }
  651.     /**
  652.      * @return string|null
  653.      */
  654.     public function getCardNumber(): ?string
  655.     {
  656.         return $this->cardNumber;
  657.     }
  658.     /**
  659.      * @param string|null $cardNumber
  660.      * @return LoyaltyMember
  661.      */
  662.     public function setCardNumber(?string $cardNumber): LoyaltyMember
  663.     {
  664.         $this->cardNumber $cardNumber;
  665.         return $this;
  666.     }
  667.     /**
  668.      * @return string|null
  669.      */
  670.     public function getMobilePhone(): ?string
  671.     {
  672.         return $this->mobilePhone;
  673.     }
  674.     /**
  675.      * @param string|null $mobilePhone
  676.      * @return LoyaltyMember
  677.      */
  678.     public function setMobilePhone(?string $mobilePhone): LoyaltyMember
  679.     {
  680.         $this->mobilePhone $mobilePhone;
  681.         $this->homePhone $mobilePhone;
  682.         return $this;
  683.     }
  684.     /**
  685.      * @return string|null
  686.      */
  687.     public function getHomePhone(): ?string
  688.     {
  689.         return $this->homePhone;
  690.     }
  691.     /**
  692.      * @param string|null $homePhone
  693.      * @return LoyaltyMember
  694.      */
  695.     public function setHomePhone(?string $homePhone): LoyaltyMember
  696.     {
  697.         $this->homePhone $homePhone;
  698.         return $this;
  699.     }
  700.     /**
  701.      * @return string|null
  702.      */
  703.     public function getAppleUserId(): ?string
  704.     {
  705.         return $this->appleUserId;
  706.     }
  707.     /**
  708.      * @param string|null $appleUserId
  709.      * @return LoyaltyMember
  710.      */
  711.     public function setAppleUserId(?string $appleUserId): LoyaltyMember
  712.     {
  713.         $this->appleUserId $appleUserId;
  714.         return $this;
  715.     }
  716.     /**
  717.      * @return string|null
  718.      */
  719.     public function getAppleEmailAddress(): ?string
  720.     {
  721.         return $this->appleEmailAddress;
  722.     }
  723.     /**
  724.      * @param string|null $appleEmailAddress
  725.      * @return LoyaltyMember
  726.      */
  727.     public function setAppleEmailAddress(?string $appleEmailAddress): LoyaltyMember
  728.     {
  729.         $this->appleEmailAddress $appleEmailAddress;
  730.         return $this;
  731.     }
  732.     /**
  733.      * @return string|null
  734.      */
  735.     public function getEmail(): ?string
  736.     {
  737.         return $this->email;
  738.     }
  739.     /**
  740.      * @param string|null $email
  741.      * @return LoyaltyMember
  742.      */
  743.     public function setEmail(?string $email): LoyaltyMember
  744.     {
  745.         $this->email $email;
  746.         return $this;
  747.     }
  748.     /**
  749.      * @return string|null
  750.      */
  751.     public function getClubID(): ?string
  752.     {
  753.         return $this->clubID;
  754.     }
  755.     /**
  756.      * @param string|null $clubID
  757.      * @return LoyaltyMember
  758.      */
  759.     public function setClubID(?string $clubID): LoyaltyMember
  760.     {
  761.         $this->clubID $clubID;
  762.         return $this;
  763.     }
  764.     /**
  765.      * @return MemberBalance[]|null
  766.      */
  767.     public function getBalanceList(): ?array
  768.     {
  769.         return $this->balanceList;
  770.     }
  771.     /**
  772.      * @param MemberBalance[]|null $balanceList
  773.      * @return LoyaltyMember
  774.      */
  775.     public function setBalanceList(?array $balanceList): LoyaltyMember
  776.     {
  777.         $this->balanceList $balanceList;
  778.         return $this;
  779.     }
  780.     /**
  781.      * Get user reward points
  782.      *
  783.      * @return int|null
  784.      */
  785.     public function getBalancePoints()
  786.     {
  787.         foreach ($this->balanceList ?: [] as $item) {
  788.             if ('Reward Points' === $item->getName()) {
  789.                 return $item->getPointsRemaining() ?? 0;
  790.             }
  791.         }
  792.         return 0;
  793.     }
  794.     /**
  795.      * @return string|null
  796.      */
  797.     public function getUserName(): ?string
  798.     {
  799.         return $this->userName;
  800.     }
  801.     /**
  802.      * @param string|null $userName
  803.      * @return LoyaltyMember
  804.      */
  805.     public function setUserName(?string $userName): LoyaltyMember
  806.     {
  807.         $this->userName $userName;
  808.         return $this;
  809.     }
  810.     /**
  811.      * @return string|null
  812.      */
  813.     public function getPassword(): ?string
  814.     {
  815.         return $this->password;
  816.     }
  817.     /**
  818.      * @param string|null $password
  819.      * @return LoyaltyMember
  820.      */
  821.     public function setPassword(?string $password): LoyaltyMember
  822.     {
  823.         $this->password $password;
  824.         return $this;
  825.     }
  826.     /**
  827.      * @return string|null
  828.      */
  829.     public function getMiddleName(): ?string
  830.     {
  831.         return $this->middleName;
  832.     }
  833.     /**
  834.      * @param string|null $middleName
  835.      * @return LoyaltyMember
  836.      */
  837.     public function setMiddleName(?string $middleName): LoyaltyMember
  838.     {
  839.         $this->middleName $middleName;
  840.         return $this;
  841.     }
  842.     /**
  843.      * @return string|null
  844.      */
  845.     public function getAddress1(): ?string
  846.     {
  847.         return $this->address1;
  848.     }
  849.     /**
  850.      * @param string|null $address1
  851.      * @return LoyaltyMember
  852.      */
  853.     public function setAddress1(?string $address1): LoyaltyMember
  854.     {
  855.         $this->address1 $address1;
  856.         return $this;
  857.     }
  858.     /**
  859.      * @return string|null
  860.      */
  861.     public function getState(): ?string
  862.     {
  863.         return $this->state;
  864.     }
  865.     /**
  866.      * @param string|null $state
  867.      * @return LoyaltyMember
  868.      */
  869.     public function setState(?string $state): LoyaltyMember
  870.     {
  871.         $this->state $state;
  872.         return $this;
  873.     }
  874.     /**
  875.      * @return string|null
  876.      */
  877.     public function getCity(): ?string
  878.     {
  879.         return $this->city;
  880.     }
  881.     /**
  882.      * @param string|null $city
  883.      * @return LoyaltyMember
  884.      */
  885.     public function setCity(?string $city): LoyaltyMember
  886.     {
  887.         $this->city $city;
  888.         return $this;
  889.     }
  890.     /**
  891.      * @return string|null
  892.      */
  893.     public function getZipCode(): ?string
  894.     {
  895.         return $this->zipCode;
  896.     }
  897.     /**
  898.      * @param string|null $zipCode
  899.      * @return LoyaltyMember
  900.      */
  901.     public function setZipCode(?string $zipCode): LoyaltyMember
  902.     {
  903.         $this->zipCode $zipCode;
  904.         return $this;
  905.     }
  906.     /**
  907.      * @return bool|null
  908.      */
  909.     public function getSendNewsletter(): ?bool
  910.     {
  911.         return $this->sendNewsletter;
  912.     }
  913.     /**
  914.      * @param bool|null $sendNewsletter
  915.      * @return LoyaltyMember
  916.      */
  917.     public function setSendNewsletter(?bool $sendNewsletter): LoyaltyMember
  918.     {
  919.         $this->sendNewsletter $sendNewsletter;
  920.         return $this;
  921.     }
  922.     /**
  923.      * @return int|null
  924.      */
  925.     public function getEducationLevel(): ?int
  926.     {
  927.         return $this->educationLevel;
  928.     }
  929.     /**
  930.      * @param int|null $educationLevel
  931.      * @return LoyaltyMember
  932.      */
  933.     public function setEducationLevel(?int $educationLevel): LoyaltyMember
  934.     {
  935.         $this->educationLevel $educationLevel;
  936.         return $this;
  937.     }
  938.     /**
  939.      * @return int|null
  940.      */
  941.     public function getHouseholdIncome(): ?int
  942.     {
  943.         return $this->householdIncome;
  944.     }
  945.     /**
  946.      * @param int|null $householdIncome
  947.      * @return LoyaltyMember
  948.      */
  949.     public function setHouseholdIncome(?int $householdIncome): LoyaltyMember
  950.     {
  951.         $this->householdIncome $householdIncome;
  952.         return $this;
  953.     }
  954.     /**
  955.      * @return int|null
  956.      */
  957.     public function getPersonsInHousehold(): ?int
  958.     {
  959.         return $this->personsInHousehold;
  960.     }
  961.     /**
  962.      * @param int|null $personsInHousehold
  963.      * @return LoyaltyMember
  964.      */
  965.     public function setPersonsInHousehold(?int $personsInHousehold): LoyaltyMember
  966.     {
  967.         $this->personsInHousehold $personsInHousehold;
  968.         return $this;
  969.     }
  970.     /**
  971.      * @return \DateTimeImmutable|null
  972.      */
  973.     public function getDateOfBirth(): ?\DateTimeImmutable
  974.     {
  975.         return $this->dateOfBirth;
  976.     }
  977.     /**
  978.      * @param \DateTimeImmutable|null $dateOfBirth
  979.      * @return LoyaltyMember
  980.      */
  981.     public function setDateOfBirth(?\DateTimeImmutable $dateOfBirth): LoyaltyMember
  982.     {
  983.         $this->dateOfBirth $dateOfBirth;
  984.         return $this;
  985.     }
  986.     /**
  987.      * @return string|null
  988.      */
  989.     public function getStatus(): ?string
  990.     {
  991.         return $this->status;
  992.     }
  993.     /**
  994.      * @param string|null $status
  995.      * @return LoyaltyMember
  996.      */
  997.     public function setStatus(?string $status): LoyaltyMember
  998.     {
  999.         $this->status $status;
  1000.         return $this;
  1001.     }
  1002.     /**
  1003.      * @return string|null
  1004.      */
  1005.     public function getSuburb(): ?string
  1006.     {
  1007.         return $this->suburb;
  1008.     }
  1009.     /**
  1010.      * @param string|null $suburb
  1011.      * @return LoyaltyMember
  1012.      */
  1013.     public function setSuburb(?string $suburb): LoyaltyMember
  1014.     {
  1015.         $this->suburb $suburb;
  1016.         return $this;
  1017.     }
  1018.     /**
  1019.      * @return string|null
  1020.      */
  1021.     public function getGender(): ?string
  1022.     {
  1023.         return $this->gender;
  1024.     }
  1025.     /**
  1026.      * @param string|null $gender
  1027.      * @return LoyaltyMember
  1028.      */
  1029.     public function setGender(?string $gender): LoyaltyMember
  1030.     {
  1031.         $this->gender $gender;
  1032.         return $this;
  1033.     }
  1034.     /**
  1035.      * @return int|null
  1036.      */
  1037.     public function getPickupComplex(): ?int
  1038.     {
  1039.         return $this->pickupComplex;
  1040.     }
  1041.     /**
  1042.      * @param int|null $pickupComplex
  1043.      * @return LoyaltyMember
  1044.      */
  1045.     public function setPickupComplex(?int $pickupComplex): LoyaltyMember
  1046.     {
  1047.         $this->pickupComplex $pickupComplex;
  1048.         return $this;
  1049.     }
  1050.     /**
  1051.      * @return int|null
  1052.      */
  1053.     public function getPreferredComplex(): ?int
  1054.     {
  1055.         return $this->preferredComplex;
  1056.     }
  1057.     /**
  1058.      * @param int|null $preferredComplex
  1059.      * @return LoyaltyMember
  1060.      */
  1061.     public function setPreferredComplex(?int $preferredComplex): LoyaltyMember
  1062.     {
  1063.         $this->preferredComplex $preferredComplex;
  1064.         return $this;
  1065.     }
  1066.     /**
  1067.      * @return integer[]|null
  1068.      */
  1069.     public function getPreferredComplexList(): ?array
  1070.     {
  1071.         return $this->preferredComplexList;
  1072.     }
  1073.     /**
  1074.      * @param integer[]|null $preferredComplexList
  1075.      * @return LoyaltyMember
  1076.      */
  1077.     public function setPreferredComplexList(?array $preferredComplexList): LoyaltyMember
  1078.     {
  1079.         $this->preferredComplexList $preferredComplexList;
  1080.         return $this;
  1081.     }
  1082.     /**
  1083.      * @return integer[]|null
  1084.      */
  1085.     public function getPreferenceList(): ?array
  1086.     {
  1087.         return $this->preferenceList;
  1088.     }
  1089.     /**
  1090.      * @param integer[]|null $preferenceList
  1091.      * @return LoyaltyMember
  1092.      */
  1093.     public function setPreferenceList(?array $preferenceList): LoyaltyMember
  1094.     {
  1095.         $this->preferenceList $preferenceList;
  1096.         return $this;
  1097.     }
  1098.     /**
  1099.      * @return bool|null
  1100.      */
  1101.     public function getOpera(): ?bool
  1102.     {
  1103.         return $this->opera;
  1104.     }
  1105.     /**
  1106.      * @param bool|null $opera
  1107.      * @return LoyaltyMember
  1108.      */
  1109.     public function setOpera(?bool $opera): LoyaltyMember
  1110.     {
  1111.         $this->opera $opera;
  1112.         return $this;
  1113.     }
  1114.     /**
  1115.      * @return bool|null
  1116.      */
  1117.     public function getFamilyClubAndChildrenActions(): ?bool
  1118.     {
  1119.         return $this->familyClubAndChildrenActions;
  1120.     }
  1121.     /**
  1122.      * @param bool|null $familyClubAndChildrenActions
  1123.      * @return LoyaltyMember
  1124.      */
  1125.     public function setFamilyClubAndChildrenActions(?bool $familyClubAndChildrenActions): LoyaltyMember
  1126.     {
  1127.         $this->familyClubAndChildrenActions $familyClubAndChildrenActions;
  1128.         return $this;
  1129.     }
  1130.     /**
  1131.      * @return bool|null
  1132.      */
  1133.     public function getRemembranceEventsService(): ?bool
  1134.     {
  1135.         return $this->remembranceEventsService;
  1136.     }
  1137.     /**
  1138.      * @param bool|null $remembranceEventsService
  1139.      * @return LoyaltyMember
  1140.      */
  1141.     public function setRemembranceEventsService(?bool $remembranceEventsService): LoyaltyMember
  1142.     {
  1143.         $this->remembranceEventsService $remembranceEventsService;
  1144.         return $this;
  1145.     }
  1146.     /**
  1147.      * @return string|null
  1148.      */
  1149.     public function getClubName(): ?string
  1150.     {
  1151.         return $this->clubName;
  1152.     }
  1153.     /**
  1154.      * @param string|null $clubName
  1155.      * @return LoyaltyMember
  1156.      */
  1157.     public function setClubName(?string $clubName): LoyaltyMember
  1158.     {
  1159.         $this->clubName $clubName;
  1160.         return $this;
  1161.     }
  1162.     /**
  1163.      * @return bool|null
  1164.      */
  1165.     public function getContactByThirdParty(): ?bool
  1166.     {
  1167.         return $this->contactByThirdParty;
  1168.     }
  1169.     /**
  1170.      * @param bool|null $contactByThirdParty
  1171.      * @return LoyaltyMember
  1172.      */
  1173.     public function setContactByThirdParty(?bool $contactByThirdParty): LoyaltyMember
  1174.     {
  1175.         $this->contactByThirdParty $contactByThirdParty;
  1176.         return $this;
  1177.     }
  1178.     /**
  1179.      * @return \DateTime|null
  1180.      */
  1181.     public function getExpiryDate(): ?\DateTime
  1182.     {
  1183.         return $this->expiryDate;
  1184.     }
  1185.     /**
  1186.      * @param \DateTime|null $expiryDate
  1187.      * @return LoyaltyMember
  1188.      */
  1189.     public function setExpiryDate(?\DateTime $expiryDate): LoyaltyMember
  1190.     {
  1191.         $this->expiryDate $expiryDate;
  1192.         return $this;
  1193.     }
  1194.     /**
  1195.      * @return bool|null
  1196.      */
  1197.     public function getWishToReceiveSMS(): ?bool
  1198.     {
  1199.         return $this->wishToReceiveSMS;
  1200.     }
  1201.     /**
  1202.      * @param bool|null $wishToReceiveSMS
  1203.      * @return LoyaltyMember
  1204.      */
  1205.     public function setWishToReceiveSMS(?bool $wishToReceiveSMS): LoyaltyMember
  1206.     {
  1207.         $this->wishToReceiveSMS $wishToReceiveSMS;
  1208.         return $this;
  1209.     }
  1210.     /**
  1211.      * @return string|null
  1212.      */
  1213.     public function getWorkZipCode(): ?string
  1214.     {
  1215.         return $this->workZipCode;
  1216.     }
  1217.     /**
  1218.      * @param string|null $workZipCode
  1219.      * @return LoyaltyMember
  1220.      */
  1221.     public function setWorkZipCode(?string $workZipCode): LoyaltyMember
  1222.     {
  1223.         $this->workZipCode $workZipCode;
  1224.         return $this;
  1225.     }
  1226.     /**
  1227.      * @return string[]|null
  1228.      */
  1229.     public function getCardList(): ?array
  1230.     {
  1231.         return $this->cardList;
  1232.     }
  1233.     /**
  1234.      * @param string[]|null $cardList
  1235.      * @return LoyaltyMember
  1236.      */
  1237.     public function setCardList(?array $cardList): LoyaltyMember
  1238.     {
  1239.         $this->cardList $cardList;
  1240.         return $this;
  1241.     }
  1242.     /**
  1243.      * @return integer[]|null
  1244.      */
  1245.     public function getPreferredGenres(): ?array
  1246.     {
  1247.         return $this->preferredGenres;
  1248.     }
  1249.     /**
  1250.      * @param array<int, string>|null $preferredGenres
  1251.      * @return LoyaltyMember
  1252.      */
  1253.     public function setPreferredGenres(?array $preferredGenres): LoyaltyMember
  1254.     {
  1255.         $this->preferredGenres $preferredGenres;
  1256.         return $this;
  1257.     }
  1258.     /**
  1259.      * @return int|null
  1260.      */
  1261.     public function getOccupation(): ?int
  1262.     {
  1263.         return $this->occupation;
  1264.     }
  1265.     /**
  1266.      * @param int|null $occupation
  1267.      * @return LoyaltyMember
  1268.      */
  1269.     public function setOccupation(?int $occupation): LoyaltyMember
  1270.     {
  1271.         $this->occupation $occupation;
  1272.         return $this;
  1273.     }
  1274.     /**
  1275.      * @return string|null
  1276.      */
  1277.     public function getMaritalStatus(): ?string
  1278.     {
  1279.         return $this->maritalStatus;
  1280.     }
  1281.     /**
  1282.      * @param string|null $maritalStatus
  1283.      * @return LoyaltyMember
  1284.      */
  1285.     public function setMaritalStatus(?string $maritalStatus): LoyaltyMember
  1286.     {
  1287.         $this->maritalStatus $maritalStatus;
  1288.         return $this;
  1289.     }
  1290.     /**
  1291.      * @return string|null
  1292.      */
  1293.     public function getMailingFrequency(): ?string
  1294.     {
  1295.         return $this->mailingFrequency;
  1296.     }
  1297.     /**
  1298.      * @param string|null $mailingFrequency
  1299.      * @return LoyaltyMember
  1300.      */
  1301.     public function setMailingFrequency(?string $mailingFrequency): LoyaltyMember
  1302.     {
  1303.         $this->mailingFrequency $mailingFrequency;
  1304.         return $this;
  1305.     }
  1306.     /**
  1307.      * @return string|null
  1308.      */
  1309.     public function getPin(): ?string
  1310.     {
  1311.         return $this->pin;
  1312.     }
  1313.     /**
  1314.      * @param string|null $pin
  1315.      * @return LoyaltyMember
  1316.      */
  1317.     public function setPin(?string $pin): LoyaltyMember
  1318.     {
  1319.         $this->pin $pin;
  1320.         return $this;
  1321.     }
  1322.     /**
  1323.      * @return \App\Entity\Local\ValueObject\ExpiryPoint[]|null
  1324.      */
  1325.     public function getExpiryPointsList(): ?array
  1326.     {
  1327.         return $this->expiryPointsList;
  1328.     }
  1329.     /**
  1330.      * @param \App\Entity\Local\ValueObject\ExpiryPoint[]|null $expiryPointsList
  1331.      * @return LoyaltyMember
  1332.      */
  1333.     public function setExpiryPointsList(?array $expiryPointsList): LoyaltyMember
  1334.     {
  1335.         $this->expiryPointsList $expiryPointsList;
  1336.         return $this;
  1337.     }
  1338.     /**
  1339.      * @return int|null
  1340.      */
  1341.     public function getMemberLevelId(): ?int
  1342.     {
  1343.         return $this->memberLevelId;
  1344.     }
  1345.     /**
  1346.      * @param int|null $memberLevelId
  1347.      * @return LoyaltyMember
  1348.      */
  1349.     public function setMemberLevelId(?int $memberLevelId): LoyaltyMember
  1350.     {
  1351.         $this->memberLevelId $memberLevelId;
  1352.         return $this;
  1353.     }
  1354.     /**
  1355.      * @return string|null
  1356.      */
  1357.     public function getMemberLevelName(): ?string
  1358.     {
  1359.         return $this->memberLevelName;
  1360.     }
  1361.     /**
  1362.      * @param string|null $memberLevelName
  1363.      * @return LoyaltyMember
  1364.      */
  1365.     public function setMemberLevelName(?string $memberLevelName): LoyaltyMember
  1366.     {
  1367.         $this->memberLevelName $memberLevelName;
  1368.         return $this;
  1369.     }
  1370.     /**
  1371.      * @return \DateTime|null
  1372.      */
  1373.     public function getLoyaltySessionExpiry(): ?\DateTime
  1374.     {
  1375.         return $this->loyaltySessionExpiry;
  1376.     }
  1377.     /**
  1378.      * @param \DateTime|null $loyaltySessionExpiry
  1379.      * @return LoyaltyMember
  1380.      */
  1381.     public function setLoyaltySessionExpiry(?\DateTime $loyaltySessionExpiry): LoyaltyMember
  1382.     {
  1383.         $this->loyaltySessionExpiry $loyaltySessionExpiry;
  1384.         return $this;
  1385.     }
  1386.     /**
  1387.      * @return string
  1388.      */
  1389.     public function getLoyaltySessionToken(): ?string
  1390.     {
  1391.         return $this->loyaltySessionToken;
  1392.     }
  1393.     /**
  1394.      * @param string $loyaltySessionToken
  1395.      *
  1396.      * @return LoyaltyMember
  1397.      */
  1398.     public function setLoyaltySessionToken(string $loyaltySessionToken): LoyaltyMember
  1399.     {
  1400.         $this->loyaltySessionToken $loyaltySessionToken;
  1401.         return $this;
  1402.     }
  1403.     /**
  1404.      * @return bool|null
  1405.      */
  1406.     public function getGiftCard(): ?bool
  1407.     {
  1408.         return $this->giftCard;
  1409.     }
  1410.     /**
  1411.      * @param bool|null $giftCard
  1412.      * @return LoyaltyMember
  1413.      */
  1414.     public function setGiftCard(?bool $giftCard): LoyaltyMember
  1415.     {
  1416.         $this->giftCard $giftCard;
  1417.         return $this;
  1418.     }
  1419.     /**
  1420.      * @return string|null
  1421.      */
  1422.     public function getGiftCardBalance(): ?string
  1423.     {
  1424.         return $this->giftCardBalance;
  1425.     }
  1426.     /**
  1427.      * @param string|null $giftCardBalance
  1428.      * @return LoyaltyMember
  1429.      */
  1430.     public function setGiftCardBalance(?string $giftCardBalance): LoyaltyMember
  1431.     {
  1432.         $this->giftCardBalance $giftCardBalance;
  1433.         return $this;
  1434.     }
  1435.     /**
  1436.      * @return \DateTime|null
  1437.      */
  1438.     public function getisBannedFromMakingUnpaidBookingsUntil(): ?\DateTime
  1439.     {
  1440.         return $this->isBannedFromMakingUnpaidBookingsUntil;
  1441.     }
  1442.     /**
  1443.      * @param \DateTime|null $isBannedFromMakingUnpaidBookingsUntil
  1444.      * @return LoyaltyMember
  1445.      */
  1446.     public function setIsBannedFromMakingUnpaidBookingsUntil(
  1447.         ?\DateTime $isBannedFromMakingUnpaidBookingsUntil
  1448.     ): LoyaltyMember {
  1449.         $this->isBannedFromMakingUnpaidBookingsUntil $isBannedFromMakingUnpaidBookingsUntil;
  1450.         return $this;
  1451.     }
  1452.     /**
  1453.      * @return bool|null
  1454.      */
  1455.     public function getMembershipActivated(): ?bool
  1456.     {
  1457.         return $this->membershipActivated;
  1458.     }
  1459.     /**
  1460.      * @param bool|null $membershipActivated
  1461.      * @return LoyaltyMember
  1462.      */
  1463.     public function setMembershipActivated(?bool $membershipActivated): LoyaltyMember
  1464.     {
  1465.         $this->membershipActivated $membershipActivated;
  1466.         return $this;
  1467.     }
  1468.     /**
  1469.      * @return string|null
  1470.      */
  1471.     public function getMemberItemId(): ?string
  1472.     {
  1473.         return $this->memberItemId;
  1474.     }
  1475.     /**
  1476.      * @param string|null $memberItemId
  1477.      * @return LoyaltyMember
  1478.      */
  1479.     public function setMemberItemId(?string $memberItemId): LoyaltyMember
  1480.     {
  1481.         $this->memberItemId $memberItemId;
  1482.         return $this;
  1483.     }
  1484.     /**
  1485.      * @return string|null
  1486.      */
  1487.     public function getExternalID(): ?string
  1488.     {
  1489.         return $this->externalID;
  1490.     }
  1491.     /**
  1492.      * @param string|null $externalID
  1493.      * @return LoyaltyMember
  1494.      */
  1495.     public function setExternalID(?string $externalID): LoyaltyMember
  1496.     {
  1497.         $this->externalID $externalID;
  1498.         return $this;
  1499.     }
  1500.     /**
  1501.      * @return string|null
  1502.      */
  1503.     public function getNationalID(): ?string
  1504.     {
  1505.         return $this->nationalID;
  1506.     }
  1507.     /**
  1508.      * @param string|null $nationalID
  1509.      * @return LoyaltyMember
  1510.      */
  1511.     public function setNationalID(?string $nationalID): LoyaltyMember
  1512.     {
  1513.         $this->nationalID $nationalID;
  1514.         return $this;
  1515.     }
  1516.     /**
  1517.      * @return PushNotificationSubscription|null
  1518.      */
  1519.     public function getPushNotificationSubscription(): ?PushNotificationSubscription
  1520.     {
  1521.         return $this->pushNotificationSubscription;
  1522.     }
  1523.     /**
  1524.      * @param PushNotificationSubscription|null $pushNotificationSubscription
  1525.      * @return LoyaltyMember
  1526.      */
  1527.     public function setPushNotificationSubscription(?PushNotificationSubscription $pushNotificationSubscription
  1528.     ): LoyaltyMember {
  1529.         $this->pushNotificationSubscription $pushNotificationSubscription;
  1530.         return $this;
  1531.     }
  1532.     /**
  1533.      * @return bool|null
  1534.      */
  1535.     public function getisAnonymous(): ?bool
  1536.     {
  1537.         return $this->isAnonymous;
  1538.     }
  1539.     /**
  1540.      * @param bool|null $isAnonymous
  1541.      * @return LoyaltyMember
  1542.      */
  1543.     public function setIsAnonymous(?bool $isAnonymous): LoyaltyMember
  1544.     {
  1545.         $this->isAnonymous $isAnonymous;
  1546.         return $this;
  1547.     }
  1548.     /**
  1549.      * @return bool|null
  1550.      */
  1551.     public function getValidatedFiscaliazionLaw(): ?bool
  1552.     {
  1553.         return $this->validatedFiscaliazionLaw;
  1554.     }
  1555.     /**
  1556.      * @param bool|null $validatedFiscaliazionLaw
  1557.      * @return LoyaltyMember
  1558.      */
  1559.     public function setValidatedFiscaliazionLaw(?bool $validatedFiscaliazionLaw): LoyaltyMember
  1560.     {
  1561.         $this->validatedFiscaliazionLaw $validatedFiscaliazionLaw;
  1562.         return $this;
  1563.     }
  1564.     /**
  1565.      * @return string|null
  1566.      */
  1567.     public function getMemberLanguageIETFCode(): ?string
  1568.     {
  1569.         return $this->memberLanguageIETFCode;
  1570.     }
  1571.     /**
  1572.      * @param string|null $memberLanguageIETFCode
  1573.      * @return LoyaltyMember
  1574.      */
  1575.     public function setMemberLanguageIETFCode(?string $memberLanguageIETFCode): LoyaltyMember
  1576.     {
  1577.         $this->memberLanguageIETFCode $memberLanguageIETFCode;
  1578.         return $this;
  1579.     }
  1580.     /**
  1581.      * @return string|null
  1582.      */
  1583.     public function getFirstAndLastNames(): ?string
  1584.     {
  1585.         return $this->getFullName();
  1586.     }
  1587.     /**
  1588.      * @return \DateTimeImmutable
  1589.      */
  1590.     public function getModifiedAt(): ?\DateTimeImmutable
  1591.     {
  1592.         return $this->modifiedAt;
  1593.     }
  1594.     /**
  1595.      * @param \DateTimeImmutable $modifiedAt
  1596.      *
  1597.      * @return LoyaltyMember
  1598.      */
  1599.     public function setModifiedAt(\DateTimeImmutable $modifiedAt): LoyaltyMember
  1600.     {
  1601.         $this->modifiedAt $modifiedAt;
  1602.         return $this;
  1603.     }
  1604.     /**
  1605.      * @return \DateTimeImmutable
  1606.      */
  1607.     public function getCreatedAt(): ?\DateTimeImmutable
  1608.     {
  1609.         return $this->createdAt;
  1610.     }
  1611.     /**
  1612.      * @param \DateTimeImmutable $createdAt
  1613.      *
  1614.      * @return LoyaltyMember
  1615.      */
  1616.     public function setCreatedAt(\DateTimeImmutable $createdAt): LoyaltyMember
  1617.     {
  1618.         $this->createdAt $createdAt;
  1619.         return $this;
  1620.     }
  1621.     /**
  1622.      * @return Restrictions
  1623.      */
  1624.     public function getRestrictions(): ?Restrictions
  1625.     {
  1626.         return $this->restrictions;
  1627.     }
  1628.     /**
  1629.      * @param Restrictions $restrictions
  1630.      *
  1631.      * @return LoyaltyMember
  1632.      */
  1633.     public function setRestrictions(Restrictions $restrictions): LoyaltyMember
  1634.     {
  1635.         $this->restrictions $restrictions;
  1636.         return $this;
  1637.     }
  1638.     /**
  1639.      * @ORM\PrePersist()
  1640.      */
  1641.     public function onPrePersist()
  1642.     {
  1643.         $this->setCreatedAt(new \DateTimeImmutable());
  1644.         $this->setModifiedAt(new \DateTimeImmutable());
  1645.     }
  1646.     /**
  1647.      * @ORM\PreUpdate()
  1648.      */
  1649.     public function onPreUpdate()
  1650.     {
  1651.         $this->setModifiedAt(new \DateTimeImmutable());
  1652.     }
  1653. }