<?php
namespace Acme\SudcmsBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: 'Acme\SudcmsBundle\Repository\FormSiteRepository')]
class FormSite
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 100)]
private $name;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $link;
#[ORM\Column(type: 'text', nullable: true)]
private $description;
#[ORM\Column(type: 'datetime')]
private $creationDatetime;
#[ORM\OneToMany(targetEntity: 'Acme\SudcmsBundle\Entity\FormAdresses', mappedBy: 'formSite')]
private $formAdresses;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fromFirstname;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fromLastname;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fromEmail;
#[ORM\Column(type: 'integer')]
private $siteUid;
#[ORM\Column(type: 'string', length: 2)]
private $siteLang;
#[ORM\Column(type: 'string', length: 255)]
private $subject;
#[ORM\Column(type: 'string', length: 255, columnDefinition: "enum('file', 'make','notification')", options: ['default' => 'file'])]
private $type;
public function __construct()
{
$this->formAdresses = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getLink(): ?string
{
return $this->link;
}
public function setLink(?string $link): self
{
$this->link = $link;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getCreationDatetime(): ?\DateTimeInterface
{
return $this->creationDatetime;
}
public function setCreationDatetime(\DateTimeInterface $creationDatetime): self
{
$this->creationDatetime = $creationDatetime;
return $this;
}
/**
* @return Collection|FormAdresses[]
*/
public function getFormAdresses(): Collection
{
return $this->formAdresses;
}
public function addFormAdress(FormAdresses $formAdress): self
{
if (!$this->formAdresses->contains($formAdress)) {
$this->formAdresses[] = $formAdress;
$formAdress->setFormSite($this);
}
return $this;
}
public function removeFormAdress(FormAdresses $formAdress): self
{
if ($this->formAdresses->contains($formAdress)) {
$this->formAdresses->removeElement($formAdress);
// set the owning side to null (unless already changed)
if ($formAdress->getFormSite() === $this) {
$formAdress->setFormSite(null);
}
}
return $this;
}
public function getFromFirstname(): ?string
{
return $this->fromFirstname;
}
public function setFromFirstname(?string $fromFirstname): self
{
$this->fromFirstname = $fromFirstname;
return $this;
}
public function getFromLastname(): ?string
{
return $this->fromLastname;
}
public function setFromLastname(?string $fromLastname): self
{
$this->fromLastname = $fromLastname;
return $this;
}
public function getFromEmail(): ?string
{
return $this->fromEmail;
}
public function setFromEmail(string $fromEmail): self
{
$this->fromEmail = $fromEmail;
return $this;
}
public function getSiteUid(): ?int
{
return $this->siteUid;
}
public function setSiteUid(int $siteUid): self
{
$this->siteUid = $siteUid;
return $this;
}
public function getSiteLang(): ?string
{
return $this->siteLang;
}
public function setSiteLang(string $siteLang): self
{
$this->siteLang = $siteLang;
return $this;
}
public function getSubject(): ?string
{
return $this->subject;
}
public function setSubject(?string $subject): self
{
$this->subject = $subject;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
}