src/Entity/CmsContact.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CmsContactRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: CmsContactRepository::class)]
  7. class CmsContact
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id = null;
  13.     #[ORM\Column(length: 255)]
  14.     private ?string $subject = null;
  15.     #[ORM\Column(length: 255)]
  16.     private ?string $name = null;
  17.     #[ORM\Column(length: 255)]
  18.     private ?string $email = null;
  19.     #[ORM\Column(length: 255)]
  20.     private ?string $details = null;
  21.     #[ORM\Column]
  22.     private ?\DateTimeImmutable $createdAt = null;
  23.     #[ORM\Column(nullable: true)]
  24.     private ?\DateTimeImmutable $processedAt = null;
  25.     #[ORM\Column(nullable: true)]
  26.     private ?\DateTimeImmutable $sendedAt = null;
  27.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  28.     private ?string $response = null;
  29.     public function __construct()
  30.     {
  31.         if (!$this->createdAt)
  32.             $this->createdAt=new \DateTimeImmutable();
  33.     }
  34.     public static function getChoiceSubject()
  35.     {
  36.         return [
  37.             "Renseignement sur Kimia Manager",
  38.             "Autre"
  39.         ];
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getSubject(): ?string
  46.     {
  47.         return $this->subject;
  48.     }
  49.     public function setSubject(string $subject): self
  50.     {
  51.         $this->subject = $subject;
  52.         return $this;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name = $name;
  61.         return $this;
  62.     }
  63.     public function getEmail(): ?string
  64.     {
  65.         return $this->email;
  66.     }
  67.     public function setEmail(string $email): self
  68.     {
  69.         $this->email = $email;
  70.         return $this;
  71.     }
  72.     public function getDetails(): ?string
  73.     {
  74.         return $this->details;
  75.     }
  76.     public function setDetails(string $details): self
  77.     {
  78.         $this->details = $details;
  79.         return $this;
  80.     }
  81.     public function getCreatedAt(): ?\DateTimeImmutable
  82.     {
  83.         return $this->createdAt;
  84.     }
  85.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  86.     {
  87.         $this->createdAt = $createdAt;
  88.         return $this;
  89.     }
  90.     public function getProcessedAt(): ?\DateTimeImmutable
  91.     {
  92.         return $this->processedAt;
  93.     }
  94.     public function setProcessedAt(\DateTimeImmutable $processedAt): self
  95.     {
  96.         $this->processedAt = $processedAt;
  97.         return $this;
  98.     }
  99.     public function getResponse(): ?string
  100.     {
  101.         return $this->response;
  102.     }
  103.     public function setResponse(string $response): self
  104.     {
  105.         $this->response = $response;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return \DateTimeImmutable|null
  110.      */
  111.     public function getSendedAt(): ?\DateTimeImmutable
  112.     {
  113.         return $this->sendedAt;
  114.     }
  115.     /**
  116.      * @param \DateTimeImmutable|null $sendedAt
  117.      */
  118.     public function setSendedAt(?\DateTimeImmutable $sendedAt): void
  119.     {
  120.         $this->sendedAt = $sendedAt;
  121.     }
  122. }