src/Entity/Core/EbookHasRegistrations.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\DBAL\Types\Types;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * Ebook Has Registrations
  9.  *
  10.  * @ORM\Table("core_ebook_has_registrations")
  11.  * @ORM\Entity(repositoryClass="App\Repository\Core\EbookHasRegistrationsRepository")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  */
  14. class EbookHasRegistrations
  15. {
  16.     /**
  17.      * @var integer
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="created_at", type="date", nullable=true)
  28.      */
  29.     private $createdAt;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="updated_at", type="date", nullable=true)
  34.      */
  35.     private $updatedAt;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="sended_at", type="date", nullable=true)
  40.      */
  41.     private $sendedAt;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="opened_at", type="date", nullable=true)
  46.      */
  47.     private $openedAt;
  48.     /**
  49.      * @var \Ebook
  50.      *
  51.      * @ORM\ManyToOne(targetEntity="App\Entity\Core\Ebook")
  52.      * @ORM\JoinColumns({
  53.      *   @ORM\JoinColumn(name="ebook_id", referencedColumnName="id", nullable=true)
  54.      * })
  55.      */
  56.     protected $ebook;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  61.      */
  62.     private $name;
  63.     /**
  64.      * @var string
  65.      *
  66.      * @ORM\Column(name="latname", type="string", length=255, nullable=true)
  67.      */
  68.     private $lastname;
  69.     /**
  70.      * @var string
  71.      *
  72.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  73.      */
  74.     private $email;
  75.     /**
  76.      * @var string
  77.      *
  78.      * @ORM\Column(name="code_registration", type="string", length=255, nullable=true)
  79.      */
  80.     private $codeRegistration;
  81.     /**
  82.      * @var string
  83.      *
  84.      * @ORM\Column(name="downloaded", type="boolean", nullable=true)
  85.      */
  86.     private $downloaded;
  87.     /**
  88.      * @ORM\PrePersist
  89.      */
  90.     public function setCreatedAtValue(): void {
  91.         $this->setCreatedAt(new \DateTime("now"));
  92.         $this->setUpdatedAt(new \DateTime("now"));
  93.     }
  94.     /**
  95.      * @ORM\PreUpdate
  96.      */
  97.     public function setUpdatedAtValue(): void {
  98.         $this->setUpdatedAt(new \DateTime("now"));
  99.     }
  100.     public function __toString() {
  101.         return (string)$this->email;
  102.     }
  103.     public function getId(): ?int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function getCreatedAt(): ?\DateTimeInterface
  108.     {
  109.         return $this->createdAt;
  110.     }
  111.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  112.     {
  113.         $this->createdAt $createdAt;
  114.         return $this;
  115.     }
  116.     public function getUpdatedAt(): ?\DateTimeInterface
  117.     {
  118.         return $this->updatedAt;
  119.     }
  120.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  121.     {
  122.         $this->updatedAt $updatedAt;
  123.         return $this;
  124.     }
  125.     public function getSendedAt(): ?\DateTimeInterface
  126.     {
  127.         return $this->sendedAt;
  128.     }
  129.     public function setSendedAt(?\DateTimeInterface $sendedAt): self
  130.     {
  131.         $this->sendedAt $sendedAt;
  132.         return $this;
  133.     }
  134.     public function getOpenedAt(): ?\DateTimeInterface
  135.     {
  136.         return $this->openedAt;
  137.     }
  138.     public function setOpenedAt(?\DateTimeInterface $openedAt): self
  139.     {
  140.         $this->openedAt $openedAt;
  141.         return $this;
  142.     }
  143.     public function getName(): ?string
  144.     {
  145.         return $this->name;
  146.     }
  147.     public function setName(?string $name): self
  148.     {
  149.         $this->name $name;
  150.         return $this;
  151.     }
  152.     public function getLastname(): ?string
  153.     {
  154.         return $this->lastname;
  155.     }
  156.     public function setLastname(?string $lastname): self
  157.     {
  158.         $this->lastname $lastname;
  159.         return $this;
  160.     }
  161.     public function getEmail(): ?string
  162.     {
  163.         return $this->email;
  164.     }
  165.     public function setEmail(?string $email): self
  166.     {
  167.         $this->email $email;
  168.         return $this;
  169.     }
  170.     public function getDownloaded(): ?bool
  171.     {
  172.         return $this->downloaded;
  173.     }
  174.     public function setDownloaded(?bool $downloaded): self
  175.     {
  176.         $this->downloaded $downloaded;
  177.         return $this;
  178.     }
  179.     public function getEbook(): ?Ebook
  180.     {
  181.         return $this->ebook;
  182.     }
  183.     public function setEbook(?Ebook $ebook): self
  184.     {
  185.         $this->ebook $ebook;
  186.         return $this;
  187.     }
  188.     public function getCodeRegistration(): ?string
  189.     {
  190.         return $this->codeRegistration;
  191.     }
  192.     public function setCodeRegistration(?string $codeRegistration): self
  193.     {
  194.         $this->codeRegistration $codeRegistration;
  195.         return $this;
  196.     }
  197.     public function isDownloaded(): ?bool
  198.     {
  199.         return $this->downloaded;
  200.     }
  201. }