src/Entity/Tenant/Event.php line 9

  1. <?php
  2. namespace App\Entity\Tenant;
  3. use App\Repository\Tenant\EventRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassEventRepository::class)]
  6. class Event
  7. {
  8.     /**
  9.      * visible :list;order:1;
  10.      */
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     /**
  16.      * visible :list;order:1;
  17.      */
  18.     #[ORM\Column]
  19.     private ?\DateTimeImmutable $createdAt null;
  20.     /**
  21.      * visible :list, form;order:2;
  22.      */
  23.     #[ORM\Column(length255)]
  24.     private ?string $name null;
  25.     /**
  26.      * visible :form;order:5;
  27.      */
  28.     #[ORM\Column(nullabletrue)]
  29.     private array $data = [];
  30.     /**
  31.      * visible :list, form;order:3;manyToOne:true
  32.      */
  33.     #[ORM\ManyToOne(inversedBy'events')]
  34.     private ?FreeTrial $freeTrial null;
  35.     /**
  36.      * visible :list, form;order:4;manyToOne:true
  37.      */
  38.     #[ORM\ManyToOne(inversedBy'events')]
  39.     private ?Subscription $subscription null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getCreatedAt(): ?\DateTimeImmutable
  45.     {
  46.         return $this->createdAt;
  47.     }
  48.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  49.     {
  50.         $this->createdAt $createdAt;
  51.         return $this;
  52.     }
  53.     public function getName(): ?string
  54.     {
  55.         return $this->name;
  56.     }
  57.     public function setName(string $name): self
  58.     {
  59.         $this->name $name;
  60.         return $this;
  61.     }
  62.     public function getJsonData(): bool|string
  63.     {
  64.         return json_encode($this->data);
  65.     }
  66.     public function getData(): array
  67.     {
  68.         return $this->data;
  69.     }
  70.     public function setData(?array $data): self
  71.     {
  72.         $this->data $data;
  73.         return $this;
  74.     }
  75.     public function getFreeTrial(): ?FreeTrial
  76.     {
  77.         return $this->freeTrial;
  78.     }
  79.     public function setFreeTrial(?FreeTrial $freeTrial): self
  80.     {
  81.         $this->freeTrial $freeTrial;
  82.         return $this;
  83.     }
  84.     public function getSubscription(): ?Subscription
  85.     {
  86.         return $this->subscription;
  87.     }
  88.     public function setSubscription(?Subscription $subscription): self
  89.     {
  90.         $this->subscription $subscription;
  91.         return $this;
  92.     }
  93.     public function __toString(): string
  94.     {
  95.         return $this->name;
  96.     }
  97. }