<?php
namespace App\Entity;
use App\Repository\NotificationSearchRepository;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotificationSearchRepository::class)
* @ORM\HasLifecycleCallbacks
*/
class NotificationSearch
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Customer::class, inversedBy="notificationSearches")
* @ORM\JoinColumn(nullable=false)
*/
private $customer;
/**
* @ORM\Column(type="string", length=255)
*/
private $search;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="datetime")
*/
private $updated_at;
/**
* @ORM\Column(type="datetime")
*/
private $last_send_date;
private $searchText;
public function getId(): ?int
{
return $this->id;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function getSearch(): ?string
{
return $this->search;
}
public function setSearch(string $search): self
{
$this->search = $search;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeInterface $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps(): void
{
$now = new \DateTime('now');
$this->setUpdatedAt($now);
if (null === $this->getCreatedAt()) {
$this->setCreatedAt($now);
}
}
public function getSearchText(): ?string
{
return $this->searchText;
}
public function setSearchText(string $searchText): self
{
$this->searchText = $searchText;
return $this;
}
public function getLastSendDate(): ?DateTime
{
return $this->last_send_date;
}
public function setLastSendDate(DateTime $last_send_date): self
{
$this->last_send_date = $last_send_date;
return $this;
}
}