<?php
namespace App\Entity\Fielpet\View;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* EventosView
*
* @ORM\Table(name="eventos_view", indexes={@ORM\Index(name="IDX_A49E84139F276F38", columns={"mascotaId"}), @ORM\Index(name="IDX_A49E8413EA0F39D2", columns={"eventoAnteriorId"})})
* @ORM\Entity
*/
class EventosView
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="SEQUENCE")
* @ORM\SequenceGenerator(sequenceName="Eventos_id_seq", allocationSize=1, initialValue=1)
*/
private $id;
/**
* @var string|null
*
* @ORM\Column(name="tipo", type="string", length=255, nullable=true)
*/
private $tipo;
/**
* @var \DateTime|null
*
* @ORM\Column(name="event_on", type="custom_datetimetz", nullable=true)
*/
private $eventOn;
/**
* @var bool|null
*
* @ORM\Column(name="done", type="boolean", nullable=true)
*/
private $done = false;
/**
* @var string|null
*
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
private $title;
/**
* @var string|null
*
* @ORM\Column(name="description", type="string", length=255, nullable=true)
*/
private $description;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="custom_datetimetz", nullable=false)
*/
private $createdAt;
/**
* @var \DateTime
*
* @ORM\Column(name="updated_at", type="custom_datetimetz", nullable=false)
*/
private $updatedAt;
/**
* @var \MascotasView
*
* @ORM\ManyToOne(targetEntity="MascotasView")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="mascota_id", referencedColumnName="id")
* })
*/
private $mascotaId;
/**
* @var \EventosView
*
* @ORM\ManyToOne(targetEntity="EventosView")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="evento_anterior_id", referencedColumnName="id")
* })
*/
private $eventoAnteriorId;
/**
* @ORM\OneToMany(targetEntity="EventosSubVetformView", mappedBy="eventoId", cascade={"persist"})
**/
private $eventosSubVetform;
public function __construct()
{
$this->eventosSubVetform = new \Doctrine\Common\Collections\ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTipo(): ?string
{
return $this->tipo;
}
public function setTipo(?string $tipo): static
{
$this->tipo = $tipo;
return $this;
}
public function getEventOn()
{
return $this->eventOn;
}
public function setEventOn($eventOn): static
{
$this->eventOn = $eventOn;
return $this;
}
public function isDone(): ?bool
{
return $this->done;
}
public function setDone(?bool $done): static
{
$this->done = $done;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): static
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getMascotaId(): ?MascotasView
{
return $this->mascotaId;
}
public function setMascotaId(?MascotasView $mascotaId): static
{
$this->mascotaId = $mascotaId;
return $this;
}
public function getEventoAnteriorId(): ?self
{
return $this->eventoAnteriorId;
}
public function setEventoAnteriorId(?self $eventoAnteriorId): static
{
$this->eventoAnteriorId = $eventoAnteriorId;
return $this;
}
/**
* @return Collection<int, EventosSubVetformView>
*/
public function getEventosSubVetform(): Collection
{
return $this->eventosSubVetform;
}
public function addEventosSubVetform(EventosSubVetformView $eventosSubVetform): static
{
if (!$this->eventosSubVetform->contains($eventosSubVetform)) {
$this->eventosSubVetform->add($eventosSubVetform);
$eventosSubVetform->setEventoId($this);
}
return $this;
}
public function removeEventosSubVetform(EventosSubVetformView $eventosSubVetform): static
{
if ($this->eventosSubVetform->removeElement($eventosSubVetform)) {
// set the owning side to null (unless already changed)
if ($eventosSubVetform->getEventoId() === $this) {
$eventosSubVetform->setEventoId(null);
}
}
return $this;
}
}