src/Entity/Actuallite.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ActualliteRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Anotation as Gedmo;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. #[ORM\Entity(repositoryClassActualliteRepository::class)]
  9. class Actuallite
  10. {
  11.     use TimestampableEntity;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $titre null;
  18.     #[ORM\Column(typeTypes::TEXT)]
  19.     private ?string $description null;
  20.     #[ORM\Column]
  21.     private ?bool $statut null;
  22.     #[Gedmo\Timestampable(on :'create')]
  23.     private ?\DateTimeImmutable $created_at null;
  24.     
  25.     #[Gedmo\Timestampable(on :'update')]
  26.     private ?\DateTimeImmutable $updated_at null;
  27.     public function getCreatedAt(): ?\DateTimeImmutable
  28.     {
  29.         return $this->created_at;
  30.     }
  31.     public function getUpdatedAt(): ?\DateTimeImmutable
  32.     {
  33.         return $this->updated_at;
  34.     }
  35.     #[ORM\Column(length255)]
  36.     private ?string $url_image null;
  37.     #[ORM\ManyToOne(inversedBy'actuallites')]
  38.     #[ORM\JoinColumn(nullablefalse)]
  39.     private ?Category $category null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getTitre(): ?string
  45.     {
  46.         return $this->titre;
  47.     }
  48.     public function setTitre(string $titre): self
  49.     {
  50.         $this->titre $titre;
  51.         return $this;
  52.     }
  53.     public function getDescription(): ?string
  54.     {
  55.         return $this->description;
  56.     }
  57.     public function setDescription(string $description): self
  58.     {
  59.         $this->description $description;
  60.         return $this;
  61.     }
  62.     public function isStatut(): ?bool
  63.     {
  64.         return $this->statut;
  65.     }
  66.     public function setStatut(bool $statut): self
  67.     {
  68.         $this->statut $statut;
  69.         return $this;
  70.     }
  71.     public function getUrlImage(): ?string
  72.     {
  73.         return $this->url_image;
  74.     }
  75.     public function setUrlImage(string $url_image): self
  76.     {
  77.         $this->url_image $url_image;
  78.         return $this;
  79.     }
  80.     public function getCategory(): ?Category
  81.     {
  82.         return $this->category;
  83.     }
  84.     public function setCategory(?Category $category): self
  85.     {
  86.         $this->category $category;
  87.         return $this;
  88.     }
  89. }