src/Entity/News.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=NewsRepository::class)
  8.  */
  9. class News
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $owner;
  21.     /**
  22.      * @ORM\Column(type="text", nullable=true)
  23.      */
  24.     private $description;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $link;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $created_at;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $newsLink;
  37.     /**
  38.      * @ORM\Column(type="datetime", nullable=true)
  39.      */
  40.     private $date;
  41.     public function __construct()
  42.     {
  43.         $this->date = new \DateTime();
  44.     }
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getOwner(): ?string
  50.     {
  51.         return $this->owner;
  52.     }
  53.     public function setOwner(?string $owner): self
  54.     {
  55.         $this->owner $owner;
  56.         return $this;
  57.     }
  58.     public function getDescription(): ?string
  59.     {
  60.         return $this->description;
  61.     }
  62.     public function setDescription(?string $description): self
  63.     {
  64.         $this->description $description;
  65.         return $this;
  66.     }
  67.     public function getLink(): ?string
  68.     {
  69.         return $this->link;
  70.     }
  71.     public function setLink(?string $link): self
  72.     {
  73.         $this->link $link;
  74.         return $this;
  75.     }
  76.     public function getCreatedAt(): ?string
  77.     {
  78.         return $this->created_at;
  79.     }
  80.     public function setCreatedAt(?string $created_at): self
  81.     {
  82.         $this->created_at $created_at;
  83.         return $this;
  84.     }
  85.     public function getNewsLink(): ?string
  86.     {
  87.         return $this->newsLink;
  88.     }
  89.     public function setNewsLink(?string $newsLink): self
  90.     {
  91.         $this->newsLink $newsLink;
  92.         return $this;
  93.     }
  94.     public function getDate(): ?\DateTimeInterface
  95.     {
  96.         return $this->date;
  97.     }
  98.     public function setDate(?\DateTimeInterface $date): self
  99.     {
  100.         $this->date $date;
  101.         return $this;
  102.     }
  103. }