<?php
namespace App\Entity\Gos;
use App\Repository\Gos\NewsletterRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NewsletterRepository::class)
* @ORM\HasLifecycleCallbacks
*/
class Newsletter
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\Column(type="string", length=255)
*/
private $hash;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateNextSend;
/**
* @ORM\ManyToOne(targetEntity=PortalSettings::class, inversedBy="newsletters")
*/
private $portalSettings;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":0})
*/
private $isConfirmed = false;
/**
* @ORM\Column(type="integer", nullable=true, options={"default":0})
*/
private $countSendMailReminder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastName;
/**
* @ORM\ManyToOne(targetEntity=NewsletterTemplate::class, inversedBy="newsletters")
*/
private $newsletterTemplate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $street;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $postalCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $city;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $position;
/** @ORM\PrePersist() */
public function prePersist()
{
$this->createdAt = new \DateTime();
}
/** @ORM\PreUpdate() */
public function preUpdate()
{
$this->updatedAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getHash(): ?string
{
return $this->hash;
}
public function setHash(string $hash): self
{
$this->hash = $hash;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getDateNextSend(): ?\DateTimeInterface
{
return $this->dateNextSend;
}
public function setDateNextSend(\DateTimeInterface $dateNextSend): self
{
$this->dateNextSend = $dateNextSend;
return $this;
}
public function getPortalSettings(): ?PortalSettings
{
return $this->portalSettings;
}
public function setPortalSettings(?PortalSettings $portalSettings): self
{
$this->portalSettings = $portalSettings;
return $this;
}
public function getIsConfirmed(): ?bool
{
return $this->isConfirmed;
}
public function setIsConfirmed(?bool $isConfirmed): self
{
$this->isConfirmed = $isConfirmed;
return $this;
}
public function getCountSendMailReminder(): ?int
{
return $this->countSendMailReminder;
}
public function setCountSendMailReminder(?int $countSendMailReminder): self
{
$this->countSendMailReminder = $countSendMailReminder;
return $this;
}
public function increaseCountSendMailReminder(): self
{
$this->countSendMailReminder++;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getNewsletterTemplate(): ?NewsletterTemplate
{
return $this->newsletterTemplate;
}
public function setNewsletterTemplate(?NewsletterTemplate $newsletterTemplate): self
{
$this->newsletterTemplate = $newsletterTemplate;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getPostalCode(): ?string
{
return $this->postalCode;
}
public function setPostalCode(?string $postalCode): self
{
$this->postalCode = $postalCode;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(?string $position): self
{
$this->position = $position;
return $this;
}
}