src/Entity/ModuleTest/InputPhase.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ModuleTest;
  3. use App\Entity\ModuleFamily;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use EightMarq\CoreComponent\Entity\BaseEntity;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Table(name="input_phases")
  9.  * @ORM\Entity()
  10.  */
  11. class InputPhase extends BaseEntity
  12. {
  13.     /**
  14.      * @var string | null
  15.      *
  16.      * @ORM\Column(type="string", nullable=true)
  17.      */
  18.     protected $type;
  19.     /**
  20.      * @var string | null
  21.      *
  22.      * @ORM\Column(type="text")
  23.      *
  24.      * @Assert\NotBlank()
  25.      */
  26.     protected $justification;
  27.     /**
  28.      * @var string | null
  29.      *
  30.      * @ORM\Column(type="string", nullable=true)
  31.      */
  32.     protected $mainCustomer;
  33.     /**
  34.      * @var string | null
  35.      *
  36.      * @ORM\Column(type="string", nullable=true)
  37.      */
  38.     protected $materials;
  39.     /**
  40.      * @var ModuleFamily | null
  41.      *
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\ModuleFamily", cascade={"persist"}))
  43.      */
  44.     protected $moduleFamily;
  45.     /**
  46.      * @var ModuleTest | null
  47.      *
  48.      * @ORM\OneToOne(targetEntity="App\Entity\ModuleTest\ModuleTest", inversedBy="inputPhase")
  49.      * @ORM\JoinColumn(nullable=false)
  50.      *
  51.      * @Assert\NotBlank()
  52.      */
  53.     protected $moduleTest;
  54.     /**
  55.      * @return string|null
  56.      */
  57.     public function __toString()
  58.     {
  59.         return $this->getType() ?? '';
  60.     }
  61.     /**
  62.      * @return string|null
  63.      */
  64.     public function getType(): ?string
  65.     {
  66.         return $this->type;
  67.     }
  68.     /**
  69.      * @param string|null $type
  70.      */
  71.     public function setType(?string $type): void
  72.     {
  73.         $this->type $type;
  74.     }
  75.     /**
  76.      * @return string|null
  77.      */
  78.     public function getJustification(): ?string
  79.     {
  80.         return $this->justification;
  81.     }
  82.     /**
  83.      * @param string|null $justification
  84.      */
  85.     public function setJustification(?string $justification): void
  86.     {
  87.         $this->justification $justification;
  88.     }
  89.     /**
  90.      * @return string|null
  91.      */
  92.     public function getMainCustomer(): ?string
  93.     {
  94.         return $this->mainCustomer;
  95.     }
  96.     /**
  97.      * @param string|null $mainCustomer
  98.      */
  99.     public function setMainCustomer(?string $mainCustomer): void
  100.     {
  101.         $this->mainCustomer $mainCustomer;
  102.     }
  103.     /**
  104.      * @return string|null
  105.      */
  106.     public function getMaterials(): ?string
  107.     {
  108.         return $this->materials;
  109.     }
  110.     /**
  111.      * @param string|null $materials
  112.      */
  113.     public function setMaterials(?string $materials): void
  114.     {
  115.         $this->materials $materials;
  116.     }
  117.     /**
  118.      * @return ModuleFamily|null
  119.      */
  120.     public function getModuleFamily(): ?ModuleFamily
  121.     {
  122.         return $this->moduleFamily;
  123.     }
  124.     /**
  125.      * @param $moduleFamily
  126.      */
  127.     public function setModuleFamily($moduleFamily): void
  128.     {
  129.         $this->moduleFamily $moduleFamily;
  130.     }
  131.     /**
  132.      * @return ModuleTest|int|null
  133.      */
  134.     public function getModuleTest()
  135.     {
  136.         return $this->moduleTest;
  137.     }
  138.     /**
  139.      * @param ModuleTest|int|null $moduleTest
  140.      */
  141.     public function setModuleTest($moduleTest): void
  142.     {
  143.         $this->moduleTest $moduleTest;
  144.     }
  145. }