src/Entity/Gos/AccessGuardian.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\AccessGuardianRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=AccessGuardianRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class AccessGuardian
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=User::class)
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $user;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $orderNumber;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $productVariant;
  30.     /**
  31.      * @ORM\Column(type="datetime_immutable", nullable=true)
  32.      */
  33.     private $accessTo;
  34.     /**
  35.      * @ORM\Column(type="datetime", nullable=true)
  36.      */
  37.     private $subscriptionTo;
  38.     /**
  39.      * @ORM\Column(type="boolean")
  40.      */
  41.     private $isGracePeriod;
  42.     /**
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $isAccessEnabled;
  46.     /**
  47.      * @ORM\Column(type="array")
  48.      */
  49.     private $rawContent = [];
  50.     /**
  51.      * @ORM\Column(type="datetime")
  52.      */
  53.     private $createdAt;
  54.     /** @ORM\PrePersist() */
  55.     public function onPrePersist()
  56.     {
  57.         $this->createdAt = new \DateTime();
  58.     }
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getUser(): ?User
  64.     {
  65.         return $this->user;
  66.     }
  67.     public function setUser(?User $user): self
  68.     {
  69.         $this->user $user;
  70.         return $this;
  71.     }
  72.     public function getOrderNumber(): ?string
  73.     {
  74.         return $this->orderNumber;
  75.     }
  76.     public function setOrderNumber(string $orderNumber): self
  77.     {
  78.         $this->orderNumber $orderNumber;
  79.         return $this;
  80.     }
  81.     public function getProductVariant(): ?string
  82.     {
  83.         return $this->productVariant;
  84.     }
  85.     public function setProductVariant(?string $productVariant): self
  86.     {
  87.         $this->productVariant $productVariant;
  88.         return $this;
  89.     }
  90.     public function getAccessTo(): ?\DateTimeImmutable
  91.     {
  92.         return $this->accessTo;
  93.     }
  94.     public function setAccessTo(?\DateTimeImmutable $accessTo): self
  95.     {
  96.         $this->accessTo $accessTo;
  97.         return $this;
  98.     }
  99.     public function getSubscriptionTo(): ?\DateTime
  100.     {
  101.         return $this->subscriptionTo;
  102.     }
  103.     public function setSubscriptionTo(?\DateTime $subscriptionTo): self
  104.     {
  105.         $this->subscriptionTo $subscriptionTo;
  106.         return $this;
  107.     }
  108.     public function getIsGracePeriod(): ?bool
  109.     {
  110.         return $this->isGracePeriod;
  111.     }
  112.     public function setIsGracePeriod(bool $isGracePeriod): self
  113.     {
  114.         $this->isGracePeriod $isGracePeriod;
  115.         return $this;
  116.     }
  117.     public function getIsAccessEnabled(): ?bool
  118.     {
  119.         return $this->isAccessEnabled;
  120.     }
  121.     public function setIsAccessEnabled(bool $isAccessEnabled): self
  122.     {
  123.         $this->isAccessEnabled $isAccessEnabled;
  124.         return $this;
  125.     }
  126.     public function getRawContent(): ?array
  127.     {
  128.         return $this->rawContent;
  129.     }
  130.     public function setRawContent(array $rawContent): self
  131.     {
  132.         $this->rawContent $rawContent;
  133.         return $this;
  134.     }
  135.     public function getCreatedAt(): ?\DateTimeInterface
  136.     {
  137.         return $this->createdAt;
  138.     }
  139.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  140.     {
  141.         $this->createdAt $createdAt;
  142.         return $this;
  143.     }
  144. }