app/Entity/Schema/ORM/MemberFlags.php line 13

Open in your IDE?
  1. <?php
  2. namespace Sq\Entity\Schema\ORM;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * MemberFlags.
  6.  */
  7. #[ORM\Entity]
  8. #[ORM\Table(name'member_flags')]
  9. #[ORM\UniqueConstraint(name'mf_m_id'columns: ['mf_m_id'])]
  10. class MemberFlags
  11. {
  12.     #[ORM\OneToOne(targetEntityMember::class, inversedBy'flags')]
  13.     #[ORM\JoinColumn(name'mf_m_id'referencedColumnName'm_id')]
  14.     #[ORM\Id]
  15.     private $member;
  16.     /**
  17.      * @var bool|null
  18.      */
  19.     #[ORM\Column(name'mf_vip'type'boolean'nullabletrue)]
  20.     private $vip;
  21.     /**
  22.      * @var bool|null
  23.      */
  24.     #[ORM\Column(name'mf_ambassador'type'boolean'nullabletrue)]
  25.     private $ambassador;
  26.     /**
  27.      * @var bool|null
  28.      */
  29.     #[ORM\Column(name'mf_influencer'type'boolean'nullabletrue)]
  30.     private $influencer;
  31.     /**
  32.      * @var string|null
  33.      */
  34.     #[ORM\Column(name'mf_discount'type'decimal'precision7scale4nullabletrue)]
  35.     private $discount;
  36.     /**
  37.      * @var string|null
  38.      */
  39.     #[ORM\Column(name'mf_discount_type'type'string'length32nullabletrue)]
  40.     private $discountType;
  41.     /**
  42.      * @var \DateTime|null
  43.      */
  44.     #[ORM\Column(name'mf_discount_expiry'type'date'nullabletrue)]
  45.     private $discountExpiry;
  46.     /**
  47.      * @var null|array
  48.      */
  49.     #[ORM\Column(name'mf_features'type'simple_array'nullabletrue)]
  50.     private $features;
  51.     /**
  52.      * @var string|null
  53.      */
  54.     #[ORM\Column(name'mf_type'type'string'length0nullabletrue)]
  55.     private $type;
  56.     /**
  57.      * @var int|null
  58.      */
  59.     #[ORM\Column(name'mf_ind_id'type'smallint'nullabletrue)]
  60.     private $indId;
  61.     /**
  62.      * @var string|null
  63.      */
  64.     #[ORM\Column(name'mf_country_code'type'string'length2nullabletrue)]
  65.     private $countryCode;
  66.     /**
  67.      * @var bool|null
  68.      */
  69.     #[ORM\Column(name'mf_verified_business'type'boolean'nullabletrue)]
  70.     private $verifiedBusiness;
  71.     /**
  72.      * @var bool|null
  73.      */
  74.     #[ORM\Column(name'mf_inbox_tw_30_day_limit_seen'type'boolean'nullabletrue)]
  75.     private $inboxTw30DayLimitSeen;
  76.     public function __construct(Member $member)
  77.     {
  78.         $this->member $member;
  79.     }
  80.     public function getMember(): Member
  81.     {
  82.         return $this->member;
  83.     }
  84.     public function isVip(): ?bool
  85.     {
  86.         return $this->vip;
  87.     }
  88.     public function setVip(?bool $vip): self
  89.     {
  90.         $this->vip $vip;
  91.         return $this;
  92.     }
  93.     public function isAmbassador(): ?bool
  94.     {
  95.         return $this->ambassador;
  96.     }
  97.     public function setAmbassador(?bool $ambassador): self
  98.     {
  99.         $this->ambassador $ambassador;
  100.         return $this;
  101.     }
  102.     public function isInfluencer(): ?bool
  103.     {
  104.         return $this->influencer;
  105.     }
  106.     public function setInfluencer(?bool $influencer): self
  107.     {
  108.         $this->influencer $influencer;
  109.         return $this;
  110.     }
  111.     public function getDiscount(): float
  112.     {
  113.         // Doctrine always gets decimals as string/null from DB, so we need to cast to float
  114.         return (float) $this->discount;
  115.     }
  116.     public function setDiscount(?float $discount): self
  117.     {
  118.         $this->discount = (string) $discount;
  119.         return $this;
  120.     }
  121.     public function getDiscountType(): ?string
  122.     {
  123.         return $this->discountType;
  124.     }
  125.     public function setDiscountType(?string $discountType): MemberFlags
  126.     {
  127.         $this->discountType $discountType;
  128.         return $this;
  129.     }
  130.     public function getDiscountExpiry(): ?\DateTime
  131.     {
  132.         return $this->discountExpiry;
  133.     }
  134.     public function setDiscountExpiry(?\DateTime $discountExpiry): MemberFlags
  135.     {
  136.         $this->discountExpiry $discountExpiry;
  137.         return $this;
  138.     }
  139.     public function getFeatures(): array
  140.     {
  141.         return $this->features ?? [];
  142.     }
  143.     public function setFeatures(?array $features): self
  144.     {
  145.         $this->features $features;
  146.         return $this;
  147.     }
  148.     public function getType(): ?string
  149.     {
  150.         return $this->type;
  151.     }
  152.     public function setType(?string $type): self
  153.     {
  154.         $this->type $type;
  155.         return $this;
  156.     }
  157.     public function getIndId(): ?int
  158.     {
  159.         return $this->indId;
  160.     }
  161.     public function setIndId(?int $indId): self
  162.     {
  163.         $this->indId $indId;
  164.         return $this;
  165.     }
  166.     public function getCountryCode(): ?string
  167.     {
  168.         return $this->countryCode;
  169.     }
  170.     public function setCountryCode(?string $countryCode): self
  171.     {
  172.         $this->countryCode $countryCode;
  173.         return $this;
  174.     }
  175.     public function isVerifiedBusiness(): ?bool
  176.     {
  177.         return $this->verifiedBusiness;
  178.     }
  179.     public function setVerifiedBusiness(?bool $verifiedBusiness): self
  180.     {
  181.         $this->verifiedBusiness $verifiedBusiness;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @param bool|null $inboxTw30DayLimitSeen
  186.      *
  187.      * @return MemberFlags
  188.      */
  189.     public function setInboxTw30DayLimitSeen(?bool $inboxTw30DayLimitSeen): MemberFlags
  190.     {
  191.         $this->inboxTw30DayLimitSeen $inboxTw30DayLimitSeen;
  192.         return $this;
  193.     }
  194.     /**
  195.      * @return bool|null
  196.      */
  197.     public function isInboxTw30DayLimitSeen(): ?bool
  198.     {
  199.         return $this->inboxTw30DayLimitSeen;
  200.     }
  201. }