src/Entity/CRM/SocialPostPlatform.php line 10

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\CRM\SocialPostPlatformRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassSocialPostPlatformRepository::class)]
  7. class SocialPostPlatform
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'socialPostPlatforms')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?SocialPost $socialPost null;
  16.     #[ORM\ManyToOne(inversedBy'socialPostPlatforms')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?SocialPlatform $socialPlatform null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?bool $published false;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $publishedAt null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $externalPostId null;
  25.     #[ORM\Column(length500nullabletrue)]
  26.     private ?string $errorMessage null;
  27.     #[ORM\Column(nullabletrueoptions: ['default' => false])]
  28.     private ?bool $publishComment false;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $commentContent null;
  31.     public function __toString(): string
  32.     {
  33.         return ($this->socialPlatform $this->socialPlatform->getName() : '') .
  34.             ($this->published ' ✓' ' ✗');
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getSocialPost(): ?SocialPost
  41.     {
  42.         return $this->socialPost;
  43.     }
  44.     public function setSocialPost(?SocialPost $socialPost): static
  45.     {
  46.         $this->socialPost $socialPost;
  47.         return $this;
  48.     }
  49.     public function getSocialPlatform(): ?SocialPlatform
  50.     {
  51.         return $this->socialPlatform;
  52.     }
  53.     public function setSocialPlatform(?SocialPlatform $socialPlatform): static
  54.     {
  55.         $this->socialPlatform $socialPlatform;
  56.         return $this;
  57.     }
  58.     public function isPublished(): ?bool
  59.     {
  60.         return $this->published;
  61.     }
  62.     public function setPublished(?bool $published): static
  63.     {
  64.         $this->published $published;
  65.         return $this;
  66.     }
  67.     public function getPublishedAt(): ?\DateTimeInterface
  68.     {
  69.         return $this->publishedAt;
  70.     }
  71.     public function setPublishedAt(?\DateTimeInterface $publishedAt): static
  72.     {
  73.         $this->publishedAt $publishedAt;
  74.         return $this;
  75.     }
  76.     public function getExternalPostId(): ?string
  77.     {
  78.         return $this->externalPostId;
  79.     }
  80.     public function setExternalPostId(?string $externalPostId): static
  81.     {
  82.         $this->externalPostId $externalPostId;
  83.         return $this;
  84.     }
  85.     public function getErrorMessage(): ?string
  86.     {
  87.         return $this->errorMessage;
  88.     }
  89.     public function setErrorMessage(?string $errorMessage): static
  90.     {
  91.         $this->errorMessage $errorMessage;
  92.         return $this;
  93.     }
  94.     public function isPublishComment(): ?bool
  95.     {
  96.         return $this->publishComment;
  97.     }
  98.     public function setPublishComment(?bool $publishComment): static
  99.     {
  100.         $this->publishComment $publishComment;
  101.         return $this;
  102.     }
  103.     public function getCommentContent(): ?string
  104.     {
  105.         return $this->commentContent;
  106.     }
  107.     public function setCommentContent(?string $commentContent): static
  108.     {
  109.         $this->commentContent $commentContent;
  110.         return $this;
  111.     }
  112. }