src/Entity/Settings.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SettingsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=SettingsRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class Settings
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=50)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $value;
  25.     /**
  26.      * @ORM\Column(type="datetime")
  27.      */
  28.     private $createdAt;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $updatedAt;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getName(): ?string
  38.     {
  39.         return $this->name;
  40.     }
  41.     public function setName(string $name): self
  42.     {
  43.         $this->name $name;
  44.         return $this;
  45.     }
  46.     public function getValue(): ?string
  47.     {
  48.         return $this->value;
  49.     }
  50.     public function setValue(string $value): self
  51.     {
  52.         $this->value $value;
  53.         return $this;
  54.     }
  55.     public function getCreatedAt(): ?\DateTimeInterface
  56.     {
  57.         return $this->createdAt;
  58.     }
  59.     /**
  60.      * @ORM\PrePersist
  61.      */
  62.     public function setCreatedAt(): self
  63.     {
  64.         $this->createdAt = new \DateTime();
  65.         return $this;
  66.     }
  67.     public function getUpdatedAt(): ?\DateTimeInterface
  68.     {
  69.         return $this->updatedAt;
  70.     }
  71.     /**
  72.      * @ORM\PreUpdate
  73.      */
  74.     public function setUpdatedAt(): self
  75.     {
  76.         $this->updatedAt = new \DateTime();
  77.         return $this;
  78.     }
  79. }