<?php
namespace App\Entity;
use App\Repository\ContactCustomRepository;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ContactCustomRepository::class)]
class ContactCustom
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[Assert\NotBlank]
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[Assert\Email(message: "Cet Email '{{ value }}' est pas un mail valide.")]
#[ORM\Column(type: 'string', length: 255)]
private $email;
#[Assert\NotBlank]
#[ORM\Column(type: 'string', length: 255)]
private $phone;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $address;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $city;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $zipCode;
#[ORM\Column(type: 'text', nullable: true)]
private $message;
#[ORM\Column(type: 'boolean', nullable: true)]
private $rgpd;
#[ORM\Column(type: 'datetime', nullable: true)]
private $dateadd;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $page;
#[ORM\Column(type: 'boolean', nullable: true, options: ['default' => 0])]
private $isadmin = false;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $subject;
#[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'contactsCustom')]
private $accountingFirm;
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 getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(?string $zipCode): self
{
$this->zipCode = $zipCode;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(?string $message): self
{
$this->message = $message;
return $this;
}
public function getRgpd(): ?bool
{
return $this->rgpd;
}
public function setRgpd(?bool $rgpd): self
{
$this->rgpd = $rgpd;
return $this;
}
public function getDateadd(): ?\DateTimeInterface
{
return $this->dateadd;
}
public function setDateadd(?\DateTimeInterface $dateadd): self
{
$this->dateadd = $dateadd;
return $this;
}
public function getPage(): ?string
{
return $this->page;
}
public function setPage(?string $page): self
{
$this->page = $page;
return $this;
}
public function getIsadmin(): ?bool
{
return $this->isadmin;
}
public function setIsadmin(?bool $isadmin): self
{
$this->isadmin = $isadmin;
return $this;
}
public function getsubject(): ?string
{
return $this->subject;
}
public function setsubject(?string $subject): self
{
$this->subject = $subject;
return $this;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(?AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
}