src/Entity/UserPost.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity
  6.  * @ORM\Table(name="user_post")
  7.  */
  8. class UserPost
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=100)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private $description;
  24.     /**
  25.      * @ORM\Column(type="boolean")
  26.      */
  27.     private $isActive true;
  28.     // --- Getters & Setters ---
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getName(): ?string
  34.     {
  35.         return $this->name;
  36.     }
  37.     public function setName(string $name): self
  38.     {
  39.         $this->name $name;
  40.         return $this;
  41.     }
  42.     public function getDescription(): ?string
  43.     {
  44.         return $this->description;
  45.     }
  46.     public function setDescription(?string $description): self
  47.     {
  48.         $this->description $description;
  49.         return $this;
  50.     }
  51.     public function getIsActive(): bool
  52.     {
  53.         return $this->isActive;
  54.     }
  55.     public function setIsActive(bool $isActive): self
  56.     {
  57.         $this->isActive $isActive;
  58.         return $this;
  59.     }
  60. }