src/Entity/CRM/SocialPostPrompt.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\CRM\SocialPostPromptRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassSocialPostPromptRepository::class)]
  9. class SocialPostPrompt
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(typeTypes::TEXT)]
  18.     private ?string $textPrompt null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $imagePrompt null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?bool $generateImage false;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?bool $isActive true;
  25.     #[ORM\Column(length50nullabletrue)]
  26.     private ?string $scheduleFrequency null;
  27.     #[ORM\Column(length50nullabletrue)]
  28.     private ?string $textModel 'gpt-5.4';
  29.     #[ORM\Column(length50nullabletrue)]
  30.     private ?string $imageModel 'gpt-image-1-mini';
  31.     #[ORM\Column(length20nullabletrue)]
  32.     private ?string $imageSize '1024x1024';
  33.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  34.     private ?string $systemPrompt null;
  35.     #[ORM\ManyToMany(targetEntitySocialPlatform::class)]
  36.     private Collection $platforms;
  37.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  38.     private ?\DateTimeInterface $lastGeneratedAt null;
  39.     public function __construct()
  40.     {
  41.         $this->platforms = new ArrayCollection();
  42.     }
  43.     public function __toString(): string
  44.     {
  45.         return $this->name ?? '';
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getName(): ?string
  52.     {
  53.         return $this->name;
  54.     }
  55.     public function setName(string $name): static
  56.     {
  57.         $this->name $name;
  58.         return $this;
  59.     }
  60.     public function getTextPrompt(): ?string
  61.     {
  62.         return $this->textPrompt;
  63.     }
  64.     public function setTextPrompt(string $textPrompt): static
  65.     {
  66.         $this->textPrompt $textPrompt;
  67.         return $this;
  68.     }
  69.     public function getImagePrompt(): ?string
  70.     {
  71.         return $this->imagePrompt;
  72.     }
  73.     public function setImagePrompt(?string $imagePrompt): static
  74.     {
  75.         $this->imagePrompt $imagePrompt;
  76.         return $this;
  77.     }
  78.     public function isGenerateImage(): ?bool
  79.     {
  80.         return $this->generateImage;
  81.     }
  82.     public function setGenerateImage(?bool $generateImage): static
  83.     {
  84.         $this->generateImage $generateImage;
  85.         return $this;
  86.     }
  87.     public function isIsActive(): ?bool
  88.     {
  89.         return $this->isActive;
  90.     }
  91.     public function setIsActive(?bool $isActive): static
  92.     {
  93.         $this->isActive $isActive;
  94.         return $this;
  95.     }
  96.     public function getScheduleFrequency(): ?string
  97.     {
  98.         return $this->scheduleFrequency;
  99.     }
  100.     public function setScheduleFrequency(?string $scheduleFrequency): static
  101.     {
  102.         $this->scheduleFrequency $scheduleFrequency;
  103.         return $this;
  104.     }
  105.     public function getTextModel(): ?string
  106.     {
  107.         return $this->textModel;
  108.     }
  109.     public function setTextModel(?string $textModel): static
  110.     {
  111.         $this->textModel $textModel;
  112.         return $this;
  113.     }
  114.     public function getImageModel(): ?string
  115.     {
  116.         return $this->imageModel;
  117.     }
  118.     public function setImageModel(?string $imageModel): static
  119.     {
  120.         $this->imageModel $imageModel;
  121.         return $this;
  122.     }
  123.     public function getImageSize(): ?string
  124.     {
  125.         return $this->imageSize;
  126.     }
  127.     public function setImageSize(?string $imageSize): static
  128.     {
  129.         $this->imageSize $imageSize;
  130.         return $this;
  131.     }
  132.     public function getSystemPrompt(): ?string
  133.     {
  134.         return $this->systemPrompt;
  135.     }
  136.     public function setSystemPrompt(?string $systemPrompt): static
  137.     {
  138.         $this->systemPrompt $systemPrompt;
  139.         return $this;
  140.     }
  141.     /**
  142.      * @return Collection<int, SocialPlatform>
  143.      */
  144.     public function getPlatforms(): Collection
  145.     {
  146.         return $this->platforms;
  147.     }
  148.     public function addPlatform(SocialPlatform $platform): static
  149.     {
  150.         if (!$this->platforms->contains($platform)) {
  151.             $this->platforms->add($platform);
  152.         }
  153.         return $this;
  154.     }
  155.     public function removePlatform(SocialPlatform $platform): static
  156.     {
  157.         $this->platforms->removeElement($platform);
  158.         return $this;
  159.     }
  160.     public function getLastGeneratedAt(): ?\DateTimeInterface
  161.     {
  162.         return $this->lastGeneratedAt;
  163.     }
  164.     public function setLastGeneratedAt(?\DateTimeInterface $lastGeneratedAt): static
  165.     {
  166.         $this->lastGeneratedAt $lastGeneratedAt;
  167.         return $this;
  168.     }
  169. }