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)
  30.      * @CrudField(label="Email")
  31.      */
  32.     private $email;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      * @CrudField(index=true, label="Société/Organisme")
  36.      */
  37.     private $society;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      * @CrudField(label="Téléphone")
  41.      */
  42.     private $phone;
  43.     /**
  44.      * @ORM\Column(type="string", length=255)
  45.      * @CrudField(label="Type de société")
  46.      */
  47.     private $societyType;
  48.     /**
  49.      * @ORM\Column(type="text")
  50.      * @CrudField(label="Sujet sur lequel je souhaite être accompagné (norme, plan, schéma directeur, règlementation, certification etc...)")
  51.      */
  52.     private $message;
  53.     /**
  54.      * @ORM\Column(type="boolean")
  55.      * @CrudField(label="Je souhaite m'inscrire à la newsletter NOOCARB")
  56.      */
  57.     private $newsletter;
  58.     /**
  59.      * @ORM\Column(type="datetime")
  60.      * @CrudField(index=true, label=null)
  61.      */
  62.     private $date;
  63.     public function __toString(): string
  64.     {
  65.         return $this->getId() ?? "N/A";
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getName(): ?string
  72.     {
  73.         return $this->name;
  74.     }
  75.     public function setName(string $name): self
  76.     {
  77.         $this->name $name;
  78.         return $this;
  79.     }
  80.     public function getFirstname(): ?string
  81.     {
  82.         return $this->firstname;
  83.     }
  84.     public function setFirstname(?string $firstname): self
  85.     {
  86.         $this->firstname $firstname;
  87.         return $this;
  88.     }
  89.     public function getEmail(): ?string
  90.     {
  91.         return $this->email;
  92.     }
  93.     public function setEmail(string $email): self
  94.     {
  95.         $this->email $email;
  96.         return $this;
  97.     }
  98.     public function getSociety(): ?string
  99.     {
  100.         return $this->society;
  101.     }
  102.     public function setSociety(string $society): self
  103.     {
  104.         $this->society $society;
  105.         return $this;
  106.     }
  107.     public function getPhone(): ?string
  108.     {
  109.         return $this->phone;
  110.     }
  111.     public function setPhone(?string $phone): self
  112.     {
  113.         $this->phone $phone;
  114.         return $this;
  115.     }
  116.     public function getSocietyType(): ?string
  117.     {
  118.         return $this->societyType;
  119.     }
  120.     public function setSocietyType(string $societyType): self
  121.     {
  122.         $this->societyType $societyType;
  123.         return $this;
  124.     }
  125.     public function getMessage(): ?string
  126.     {
  127.         return $this->message;
  128.     }
  129.     public function setMessage(string $message): self
  130.     {
  131.         $this->message $message;
  132.         return $this;
  133.     }
  134.     public function isNewsletter(): ?bool
  135.     {
  136.         return $this->newsletter;
  137.     }
  138.     public function setNewsletter(bool $newsletter): self
  139.     {
  140.         $this->newsletter $newsletter;
  141.         return $this;
  142.     }
  143.     public function getDate(): ?\DateTimeInterface
  144.     {
  145.         return $this->date;
  146.     }
  147.     public function setDate(\DateTimeInterface $date): self
  148.     {
  149.         $this->date $date;
  150.         return $this;
  151.     }
  152. }