src/Entity/CRM/SocialPlatform.php line 12
<?phpnamespace App\Entity\CRM;use App\Repository\CRM\SocialPlatformRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SocialPlatformRepository::class)]class SocialPlatform{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 50, nullable: true)]private ?string $type = null;#[ORM\Column(nullable: true)]private ?bool $isActive = true;#[ORM\Column(length: 500, nullable: true)]private ?string $pageId = null;#[ORM\Column(length: 500, nullable: true)]private ?string $facebookPageId = null;#[ORM\Column(length: 1000, nullable: true)]private ?string $accessToken = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $defaultCommentContent = null;#[ORM\OneToMany(mappedBy: 'socialPlatform', targetEntity: SocialPostPlatform::class, orphanRemoval: true)]private Collection $socialPostPlatforms;public function __construct(){$this->socialPostPlatforms = new ArrayCollection();}public function __toString(): string{return $this->name ?? '';}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getType(): ?string{return $this->type;}public function setType(?string $type): static{$this->type = $type;return $this;}public function isIsActive(): ?bool{return $this->isActive;}public function setIsActive(?bool $isActive): static{$this->isActive = $isActive;return $this;}public function getPageId(): ?string{return $this->pageId;}public function setPageId(?string $pageId): static{$this->pageId = $pageId;return $this;}public function getFacebookPageId(): ?string{return $this->facebookPageId;}public function setFacebookPageId(?string $facebookPageId): static{$this->facebookPageId = $facebookPageId;return $this;}public function getAccessToken(): ?string{return $this->accessToken;}public function setAccessToken(?string $accessToken): static{$this->accessToken = $accessToken;return $this;}public function getDefaultCommentContent(): ?string{return $this->defaultCommentContent;}public function setDefaultCommentContent(?string $defaultCommentContent): static{$this->defaultCommentContent = $defaultCommentContent;return $this;}/*** @return Collection<int, SocialPostPlatform>*/public function getSocialPostPlatforms(): Collection{return $this->socialPostPlatforms;}public function addSocialPostPlatform(SocialPostPlatform $socialPostPlatform): static{if (!$this->socialPostPlatforms->contains($socialPostPlatform)) {$this->socialPostPlatforms->add($socialPostPlatform);$socialPostPlatform->setSocialPlatform($this);}return $this;}public function removeSocialPostPlatform(SocialPostPlatform $socialPostPlatform): static{if ($this->socialPostPlatforms->removeElement($socialPostPlatform)) {if ($socialPostPlatform->getSocialPlatform() === $this) {$socialPostPlatform->setSocialPlatform(null);}}return $this;}}