src/Entity/StoryRecord.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StoryRecordRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassStoryRecordRepository::class)]
  6. class StoryRecord extends PostRecord
  7. {
  8.     #[ORM\Column(length255nullabletrue)]
  9.     private ?string $profileStoryTotalInteractions null;
  10.     #[ORM\Column(length255nullabletrue)]
  11.     private ?string $profilePostFollows null;
  12.     #[ORM\Column(length255nullabletrue)]
  13.     private ?string $profilePostProfileVists null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $profileStoryImpressions null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $profileStoryTapsForward null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $profileStoryTapsBack null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $profileStoryExits null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $profileStoryReplies null;
  24.     public function getProfileStoryTotalInteractions(): ?string
  25.     {
  26.         return $this->profileStoryTotalInteractions;
  27.     }
  28.     public function setProfileStoryTotalInteractions(?string $profileStoryTotalInteractions): static
  29.     {
  30.         $this->profileStoryTotalInteractions $profileStoryTotalInteractions;
  31.         return $this;
  32.     }
  33.     public function getProfilePostFollows(): ?string
  34.     {
  35.         return $this->profilePostFollows;
  36.     }
  37.     public function setProfilePostFollows(?string $profilePostFollows): static
  38.     {
  39.         $this->profilePostFollows $profilePostFollows;
  40.         return $this;
  41.     }
  42.     public function getProfilePostProfileVists(): ?string
  43.     {
  44.         return $this->profilePostProfileVists;
  45.     }
  46.     public function setProfilePostProfileVists(?string $profilePostProfileVists): static
  47.     {
  48.         $this->profilePostProfileVists $profilePostProfileVists;
  49.         return $this;
  50.     }
  51.     public function getProfileStoryImpressions(): ?string
  52.     {
  53.         return $this->profileStoryImpressions;
  54.     }
  55.     public function setProfileStoryImpressions(?string $profileStoryImpressions): static
  56.     {
  57.         $this->profileStoryImpressions $profileStoryImpressions;
  58.         return $this;
  59.     }
  60.     public function getProfileStoryTapsForward(): ?string
  61.     {
  62.         return $this->profileStoryTapsForward;
  63.     }
  64.     public function setProfileStoryTapsForward(?string $profileStoryTapsForward): static
  65.     {
  66.         $this->profileStoryTapsForward $profileStoryTapsForward;
  67.         return $this;
  68.     }
  69.     public function getProfileStoryTapsBack(): ?string
  70.     {
  71.         return $this->profileStoryTapsBack;
  72.     }
  73.     public function setProfileStoryTapsBack(?string $profileStoryTapsBack): static
  74.     {
  75.         $this->profileStoryTapsBack $profileStoryTapsBack;
  76.         return $this;
  77.     }
  78.     public function getProfileStoryExits(): ?string
  79.     {
  80.         return $this->profileStoryExits;
  81.     }
  82.     public function setProfileStoryExits(?string $profileStoryExits): static
  83.     {
  84.         $this->profileStoryExits $profileStoryExits;
  85.         return $this;
  86.     }
  87.     public function getProfileStoryReplies(): ?string
  88.     {
  89.         return $this->profileStoryReplies;
  90.     }
  91.     public function setProfileStoryReplies(?string $profileStoryReplies): static
  92.     {
  93.         $this->profileStoryReplies $profileStoryReplies;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return string|null
  98.      */
  99.     public function getStoryEngagement(): ?string
  100.     {
  101.         return $this->profileStoryTotalInteractions +  $this->profilePostProfileVists $this->profilePostFollows ;
  102.     }
  103.     public function getTotalInteractions(): ?int
  104.     {
  105.         return $this->getProfileStoryTotalInteractions() + $this->getProfileStoryReplies() + $this->getShareCount() ;
  106.     }
  107. }