src/Entity/Forms/Support.php line 18

  1. <?php
  2. namespace App\Entity\Forms;
  3. use App\Entity\Traits\CreatedTrait;
  4. use App\Entity\Traits\DeletedTrait;
  5. use App\Entity\Traits\UpdatedTrait;
  6. use App\Entity\User\User;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Class Support
  10.  * @package App\Entity\Forms
  11.  */
  12. #[ORM\Table(name'forms_support')]
  13. #[ORM\Entity(repositoryClass'App\Repository\Forms\SupportRepository')]
  14. #[ORM\HasLifecycleCallbacks]
  15. class Support
  16. {
  17.     use CreatedTrait;
  18.     use UpdatedTrait;
  19.     use DeletedTrait;
  20.     #[ORM\Id]
  21.     #[ORM\GeneratedValue(strategy'AUTO')]
  22.     #[ORM\Column(type'integer')]
  23.     private ?int $id;
  24.     #[ORM\Column(type'string'nullablefalse)]
  25.     private ?string $caption;
  26.     #[ORM\Column(type'string'nullablefalse)]
  27.     private ?string $email;
  28.     #[ORM\Column(type'string'nullabletrue)]
  29.     private ?string $phone;
  30.     #[ORM\Column(type'text')]
  31.     private ?string $message;
  32.     #[ORM\ManyToOne(targetEntity'App\Entity\User\User')]
  33.     #[ORM\JoinColumn(nullabletrue)]
  34.     private ?User $user;
  35.     /**
  36.      * @return int|null
  37.      */
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     /**
  43.      * @param int|null $id
  44.      */
  45.     public function setId(?int $id): void
  46.     {
  47.         $this->id $id;
  48.     }
  49.     /**
  50.      * @return string|null
  51.      */
  52.     public function getEmail(): ?string
  53.     {
  54.         return $this->email;
  55.     }
  56.     /**
  57.      * @param string|null $email
  58.      */
  59.     public function setEmail(?string $email): void
  60.     {
  61.         $this->email $email;
  62.     }
  63.     /**
  64.      * @return string|null
  65.      */
  66.     public function getPhone(): ?string
  67.     {
  68.         return $this->phone;
  69.     }
  70.     /**
  71.      * @param string|null $phone
  72.      */
  73.     public function setPhone(?string $phone): void
  74.     {
  75.         $this->phone $phone;
  76.     }
  77.     /**
  78.      * @return string|null
  79.      */
  80.     public function getMessage(): ?string
  81.     {
  82.         return $this->message;
  83.     }
  84.     /**
  85.      * @param string|null $message
  86.      */
  87.     public function setMessage(?string $message): void
  88.     {
  89.         $this->message $message;
  90.     }
  91.     /**
  92.      * @return User|null
  93.      */
  94.     public function getUser(): ?User
  95.     {
  96.         return $this->user;
  97.     }
  98.     /**
  99.      * @param User|null $user
  100.      */
  101.     public function setUser(?User $user): void
  102.     {
  103.         $this->user $user;
  104.     }
  105.     /**
  106.      * @return string|null
  107.      */
  108.     public function getCaption(): ?string
  109.     {
  110.         return $this->caption;
  111.     }
  112.     /**
  113.      * @param string|null $caption
  114.      */
  115.     public function setCaption(?string $caption): void
  116.     {
  117.         $this->caption $caption;
  118.     }
  119. }