src/Entity/Gos/PartnerRequest.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\PartnerRequestRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=PartnerRequestRepository::class)
  7.  */
  8. class PartnerRequest
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $company;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $contact;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $email;
  28.     /**
  29.      * @ORM\Column(type="string", length=255)
  30.      */
  31.     private $phone;
  32.     /**
  33.      * @ORM\Column(type="text")
  34.      */
  35.     private $message;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      */
  39.     private $portal;
  40.     /**
  41.      * @ORM\Column(type="datetime")
  42.      */
  43.     private $createdAt;
  44.     public static function create(array $formDatastring $portalName): self
  45.     {
  46.         return (new self())
  47.             ->setCompany($formData['companyName'])
  48.             ->setContact($formData['contactPerson'])
  49.             ->setEmail($formData['email'])
  50.             ->setPhone($formData['phone'])
  51.             ->setMessage($formData['message'])
  52.             ->setPortal($portalName)
  53.             ->setCreatedAt(new \DateTime());
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getCompany(): ?string
  60.     {
  61.         return $this->company;
  62.     }
  63.     public function setCompany(string $company): self
  64.     {
  65.         $this->company $company;
  66.         return $this;
  67.     }
  68.     public function getContact(): ?string
  69.     {
  70.         return $this->contact;
  71.     }
  72.     public function setContact(string $contact): self
  73.     {
  74.         $this->contact $contact;
  75.         return $this;
  76.     }
  77.     public function getEmail(): ?string
  78.     {
  79.         return $this->email;
  80.     }
  81.     public function setEmail(string $email): self
  82.     {
  83.         $this->email $email;
  84.         return $this;
  85.     }
  86.     public function getPhone(): ?string
  87.     {
  88.         return $this->phone;
  89.     }
  90.     public function setPhone(string $phone): self
  91.     {
  92.         $this->phone $phone;
  93.         return $this;
  94.     }
  95.     public function getMessage(): ?string
  96.     {
  97.         return $this->message;
  98.     }
  99.     public function setMessage(string $message): self
  100.     {
  101.         $this->message $message;
  102.         return $this;
  103.     }
  104.     public function getPortal(): ?string
  105.     {
  106.         return $this->portal;
  107.     }
  108.     public function setPortal(string $portal): self
  109.     {
  110.         $this->portal $portal;
  111.         return $this;
  112.     }
  113.     public function getCreatedAt(): ?\DateTimeInterface
  114.     {
  115.         return $this->createdAt;
  116.     }
  117.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  118.     {
  119.         $this->createdAt $createdAt;
  120.         return $this;
  121.     }
  122. }