src/Entity/FormQuotationServices.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FormQuotationServicesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=FormQuotationServicesRepository::class)
  8.  */
  9. class FormQuotationServices extends BaseForm
  10. {
  11.     /**
  12.      * @ORM\Column(type="string")
  13.      * @Assert\Length(max="255")
  14.      * @Assert\NotBlank()
  15.      */
  16.     private $type_person;
  17.     /**
  18.      * @ORM\Column(type="string")
  19.      * @Assert\Length(max="255")
  20.      * @Assert\NotBlank()
  21.      */
  22.     private $document_type;
  23.     /**
  24.      * @ORM\Column(type="string")
  25.      * @Assert\Length(max="255")
  26.      * @Assert\NotBlank()
  27.      */
  28.     private $document_number;
  29.     /**
  30.      * @ORM\Column(type="string", nullable=true)
  31.      * @Assert\Length(max="255")
  32.      */
  33.     private $company;
  34.     /**
  35.      * @ORM\Column(type="string")
  36.      * @Assert\Length(max="255")
  37.      * @Assert\NotBlank()
  38.      */
  39.     private $name;
  40.     /**
  41.      * @ORM\Column(type="string")
  42.      * @Assert\Length(max="255")
  43.      * @Assert\NotBlank()
  44.      */
  45.     private $lastname;
  46.     /**
  47.      * @ORM\Column(type="string")
  48.      * @Assert\Length(max="255")
  49.      * @Assert\NotBlank()
  50.      */
  51.     private $phone;
  52.     /**
  53.      * @ORM\Column(type="string")
  54.      * @Assert\Length(max="255")
  55.      * @Assert\NotBlank()
  56.      */
  57.     private $email;
  58.     /**
  59.      * @ORM\Column(type="string")
  60.      * @Assert\Length(max="255")
  61.      * @Assert\NotBlank()
  62.      */
  63.     private $service;
  64.     /**
  65.      * @ORM\Column(type="string")
  66.      * @Assert\Length(max="255")
  67.      * @Assert\NotBlank()
  68.      */
  69.     private $establishment;
  70.     /**
  71.      * @ORM\Column(type="string")
  72.      * @Assert\Length(max="255")
  73.      * @Assert\NotBlank()
  74.      */
  75.     private $date;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity="User", inversedBy="quotation_services")
  78.      * @ORM\JoinColumn(name="adviser_id", referencedColumnName="id", onDelete="SET NULL")
  79.      */
  80.     private $adviser;
  81.     /**
  82.      * @ORM\Column(type="text", nullable=true)
  83.      */
  84.     private $message;
  85.     /**
  86.      * FormQuotationServices constructor.
  87.      */
  88.     public function __construct()
  89.     {
  90.         parent::__construct();
  91.     }
  92.     public function toRequest(): RequestService
  93.     {
  94.         return (new RequestService())
  95.             ->setDate($this->getDate())
  96.             ->setService($this->getService())
  97.             ->setMessage($this->getMessage());
  98.     }
  99.     public function getTypePerson(): ?string
  100.     {
  101.         return $this->type_person;
  102.     }
  103.     public function setTypePerson(string $type_person): self
  104.     {
  105.         $this->type_person $type_person;
  106.         return $this;
  107.     }
  108.     public function getDocumentType(): ?string
  109.     {
  110.         return $this->document_type;
  111.     }
  112.     public function setDocumentType(string $document_type): self
  113.     {
  114.         $this->document_type $document_type;
  115.         return $this;
  116.     }
  117.     public function getDocumentNumber(): ?string
  118.     {
  119.         return $this->document_number;
  120.     }
  121.     public function setDocumentNumber(string $document_number): self
  122.     {
  123.         $this->document_number $document_number;
  124.         return $this;
  125.     }
  126.     public function getCompany(): ?string
  127.     {
  128.         return $this->company;
  129.     }
  130.     public function setCompany(?string $company): self
  131.     {
  132.         $this->company $company;
  133.         return $this;
  134.     }
  135.     public function getName(): ?string
  136.     {
  137.         return $this->name;
  138.     }
  139.     public function setName(string $name): self
  140.     {
  141.         $this->name $name;
  142.         return $this;
  143.     }
  144.     public function getLastname(): ?string
  145.     {
  146.         return $this->lastname;
  147.     }
  148.     public function setLastname(string $lastname): self
  149.     {
  150.         $this->lastname $lastname;
  151.         return $this;
  152.     }
  153.     public function getPhone(): ?string
  154.     {
  155.         return $this->phone;
  156.     }
  157.     public function setPhone(string $phone): self
  158.     {
  159.         $this->phone $phone;
  160.         return $this;
  161.     }
  162.     public function getEmail(): ?string
  163.     {
  164.         return $this->email;
  165.     }
  166.     public function setEmail(string $email): self
  167.     {
  168.         $this->email $email;
  169.         return $this;
  170.     }
  171.     public function getService(): ?string
  172.     {
  173.         return $this->service;
  174.     }
  175.     public function setService(string $service): self
  176.     {
  177.         $this->service $service;
  178.         return $this;
  179.     }
  180.     public function getEstablishment(): ?string
  181.     {
  182.         return $this->establishment;
  183.     }
  184.     public function setEstablishment(string $establishment): self
  185.     {
  186.         $this->establishment $establishment;
  187.         return $this;
  188.     }
  189.     public function getDate(): ?string
  190.     {
  191.         return $this->date;
  192.     }
  193.     public function setDate(string $date): self
  194.     {
  195.         $this->date $date;
  196.         return $this;
  197.     }
  198.     public function getMessage(): ?string
  199.     {
  200.         return $this->message;
  201.     }
  202.     public function setMessage(?string $message): self
  203.     {
  204.         $this->message $message;
  205.         return $this;
  206.     }
  207.     public function getAdviser(): ?User
  208.     {
  209.         return $this->adviser;
  210.     }
  211.     public function setAdviser(?User $adviser): self
  212.     {
  213.         $this->adviser $adviser;
  214.         return $this;
  215.     }
  216. }