src/Entity/News.php line 12

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\NewsRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassNewsRepository::class)]
  8. class News
  9. {
  10.     final public const RESOURCE_KEY 'news';
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(typeTypes::INTEGER)]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  16.     private ?string $title null;
  17.     /*
  18.      * News-Gird description has no limit (max 4.294.967.292)
  19.      */
  20.     #[ORM\Column(typeTypes::TEXTnullablefalse)]
  21.     private string $description;
  22.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  23.     private ?string $source null;
  24.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  25.     private ?string $date null;
  26.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  27.     private ?string $image null;
  28.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  29.     private ?string $url null;
  30.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  31.     private ?string $tags null;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getTitle(): ?string
  37.     {
  38.         return $this->title;
  39.     }
  40.     public function setTitle(string $title): void
  41.     {
  42.         $this->title $title;
  43.     }
  44.     public function getDescription(): ?string
  45.     {
  46.         return $this->description;
  47.     }
  48.     public function setDescription(string $description): void
  49.     {
  50.         $this->description $description;
  51.     }
  52.     public function getSource(): ?string
  53.     {
  54.         return $this->source;
  55.     }
  56.     public function setSource(string $source): void
  57.     {
  58.         $this->source $source;
  59.     }
  60.     public function getDate(): ?string
  61.     {
  62.         return $this->date;
  63.     }
  64.     public function setDate(string $date): void
  65.     {
  66.         $this->date $date;
  67.     }
  68.     public function getImage(): ?string
  69.     {
  70.         return $this->image;
  71.     }
  72.     public function setImage(string $image): void
  73.     {
  74.         $this->image $image;
  75.     }
  76.     public function getUrl(): ?string
  77.     {
  78.         return $this->url;
  79.     }
  80.     public function setUrl(string $url): void
  81.     {
  82.         $this->url $url;
  83.     }
  84.     /**
  85.      * @return string|null
  86.      */
  87.     public function getTags(): ?string
  88.     {
  89.         return $this->tags;
  90.     }
  91.     /**
  92.      * @param string|null $tags
  93.      */
  94.     public function setTags(?string $tags): void
  95.     {
  96.         $this->tags $tags;
  97.     }
  98. }