src/Entity/Contact.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassContactRepository::class)]
  7. class Contact
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $firstname;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $lastname;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $email;
  19.     #[ORM\Column(type'string'length255)]
  20.     private $phone;
  21.     #[ORM\Column(type'text')]
  22.     private $message;
  23.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $date_creation null;
  25.     #[ORM\Column(type'boolean')]
  26.     private $done false;
  27.     public function __construct() {
  28.         $this->date_creation = new \DateTime();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getFirstname(): ?string
  35.     {
  36.         return $this->firstname;
  37.     }
  38.     public function setFirstname(string $firstname): self
  39.     {
  40.         $this->firstname $firstname;
  41.         return $this;
  42.     }
  43.     public function getLastname(): ?string
  44.     {
  45.         return $this->lastname;
  46.     }
  47.     public function setLastname(string $lastname): self
  48.     {
  49.         $this->lastname $lastname;
  50.         return $this;
  51.     }
  52.     public function getEmail(): ?string
  53.     {
  54.         return $this->email;
  55.     }
  56.     public function setEmail(string $email): self
  57.     {
  58.         $this->email $email;
  59.         return $this;
  60.     }
  61.     public function getPhone(): ?string
  62.     {
  63.         return $this->phone;
  64.     }
  65.     public function setPhone(string $phone): self
  66.     {
  67.         $this->phone $phone;
  68.         return $this;
  69.     }
  70.     public function getMessage(): ?string
  71.     {
  72.         return $this->message;
  73.     }
  74.     public function setMessage(string $message): self
  75.     {
  76.         $this->message $message;
  77.         return $this;
  78.     }
  79.     public function getDateCreation(): ?\DateTimeInterface
  80.     {
  81.         return $this->date_creation;
  82.     }
  83.     public function setDateCreation(\DateTimeInterface $date_creation): self
  84.     {
  85.         $this->date_creation $date_creation;
  86.         return $this;
  87.     }
  88.     public function isDone(): ?bool
  89.     {
  90.         return $this->done;
  91.     }
  92.     public function Do()
  93.     {
  94.         $this->done true;
  95.     }
  96.     public function unDo()
  97.     {
  98.         $this->done false;
  99.     }
  100.     public function setDone(bool $done): self
  101.     {
  102.         $this->done $done;
  103.         return $this;
  104.     }
  105. }