src/Entity/Contact.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Cofondateur\SocleTechniqueBundle\Annotation\CrudField;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ContactRepository::class)
  8.  */
  9. class Contact
  10. {
  11.         
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      * @CrudField(index=true, label="Nom")
  21.      */
  22.     private $name;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      * @CrudField(index=true, label="Prénom")
  26.      */
  27.     private $firstname;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      * @CrudField(label="Profession")
  31.      */
  32.     private $job;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      * @CrudField(label="Téléphone")
  36.      */
  37.     private $phone;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      * @CrudField(label="Email")
  41.      */
  42.     private $email;
  43.     /**
  44.      * @ORM\Column(type="string", length=255)
  45.      * @CrudField(label="Objet de la demande")
  46.      */
  47.     private $object;
  48.     /**
  49.      * @ORM\Column(type="text")
  50.      * @CrudField(label="Message")
  51.      */
  52.     private $message;
  53.     /**
  54.      * @ORM\Column(type="date")
  55.      * @CrudField(index=true, label="Date")
  56.      */
  57.     private $createdAt;
  58.     public function __toString(): string
  59.     {
  60.         return $this->getId() ?? "N/A";
  61.     }
  62.     public function getId(): ?int
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getName(): ?string
  67.     {
  68.         return $this->name;
  69.     }
  70.     public function setName(string $name): self
  71.     {
  72.         $this->name $name;
  73.         return $this;
  74.     }
  75.     public function getFirstname(): ?string
  76.     {
  77.         return $this->firstname;
  78.     }
  79.     public function setFirstname(?string $firstname): self
  80.     {
  81.         $this->firstname $firstname;
  82.         return $this;
  83.     }
  84.     public function getJob(): ?string
  85.     {
  86.         return $this->job;
  87.     }
  88.     public function setJob(?string $job): self
  89.     {
  90.         $this->job $job;
  91.         return $this;
  92.     }
  93.     public function getPhone(): ?string
  94.     {
  95.         return $this->phone;
  96.     }
  97.     public function setPhone(?string $phone): self
  98.     {
  99.         $this->phone $phone;
  100.         return $this;
  101.     }
  102.     public function getEmail(): ?string
  103.     {
  104.         return $this->email;
  105.     }
  106.     public function setEmail(string $email): self
  107.     {
  108.         $this->email $email;
  109.         return $this;
  110.     }
  111.     public function getObject(): ?string
  112.     {
  113.         return $this->object;
  114.     }
  115.     public function setObject(string $object): self
  116.     {
  117.         $this->object $object;
  118.         return $this;
  119.     }
  120.     public function getMessage(): ?string
  121.     {
  122.         return $this->message;
  123.     }
  124.     public function setMessage(string $message): self
  125.     {
  126.         $this->message $message;
  127.         return $this;
  128.     }
  129.     public function getCreatedAt(): ?\DateTimeInterface
  130.     {
  131.         return $this->createdAt;
  132.     }
  133.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  134.     {
  135.         $this->createdAt $createdAt;
  136.         return $this;
  137.     }
  138. }