<?php
namespace App\Entity;
use App\Repository\ContactRepository;
use Cofondateur\SocleTechniqueBundle\Annotation\CrudField;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ContactRepository::class)
*/
class Contact
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @CrudField(index=true, label="Nom")
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @CrudField(index=true, label="Prénom")
*/
private $firstname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @CrudField(label="Profession")
*/
private $job;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @CrudField(label="Téléphone")
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
* @CrudField(label="Email")
*/
private $email;
/**
* @ORM\Column(type="string", length=255)
* @CrudField(label="Objet de la demande")
*/
private $object;
/**
* @ORM\Column(type="text")
* @CrudField(label="Message")
*/
private $message;
/**
* @ORM\Column(type="date")
* @CrudField(index=true, label="Date")
*/
private $createdAt;
public function __toString(): string
{
return $this->getId() ?? "N/A";
}
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 getFirstname(): ?string
{
return $this->firstname;
}
public function setFirstname(?string $firstname): self
{
$this->firstname = $firstname;
return $this;
}
public function getJob(): ?string
{
return $this->job;
}
public function setJob(?string $job): self
{
$this->job = $job;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getObject(): ?string
{
return $this->object;
}
public function setObject(string $object): self
{
$this->object = $object;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
}