<?phpnamespace App\Entity\Gos;use App\Repository\Gos\AccessGuardianRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=AccessGuardianRepository::class) * @ORM\HasLifecycleCallbacks() */class AccessGuardian{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $user; /** * @ORM\Column(type="string", length=255) */ private $orderNumber; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $productVariant; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ private $accessTo; /** * @ORM\Column(type="datetime", nullable=true) */ private $subscriptionTo; /** * @ORM\Column(type="boolean") */ private $isGracePeriod; /** * @ORM\Column(type="boolean") */ private $isAccessEnabled; /** * @ORM\Column(type="array") */ private $rawContent = []; /** * @ORM\Column(type="datetime") */ private $createdAt; /** @ORM\PrePersist() */ public function onPrePersist() { $this->createdAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getOrderNumber(): ?string { return $this->orderNumber; } public function setOrderNumber(string $orderNumber): self { $this->orderNumber = $orderNumber; return $this; } public function getProductVariant(): ?string { return $this->productVariant; } public function setProductVariant(?string $productVariant): self { $this->productVariant = $productVariant; return $this; } public function getAccessTo(): ?\DateTimeImmutable { return $this->accessTo; } public function setAccessTo(?\DateTimeImmutable $accessTo): self { $this->accessTo = $accessTo; return $this; } public function getSubscriptionTo(): ?\DateTime { return $this->subscriptionTo; } public function setSubscriptionTo(?\DateTime $subscriptionTo): self { $this->subscriptionTo = $subscriptionTo; return $this; } public function getIsGracePeriod(): ?bool { return $this->isGracePeriod; } public function setIsGracePeriod(bool $isGracePeriod): self { $this->isGracePeriod = $isGracePeriod; return $this; } public function getIsAccessEnabled(): ?bool { return $this->isAccessEnabled; } public function setIsAccessEnabled(bool $isAccessEnabled): self { $this->isAccessEnabled = $isAccessEnabled; return $this; } public function getRawContent(): ?array { return $this->rawContent; } public function setRawContent(array $rawContent): self { $this->rawContent = $rawContent; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; }}