src/Entity/Gos/SalesManagoTag.php line 12

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