src/Entity/ProjectInformation.php line 22

Open in your IDE?
  1. <?php
  2. /**
  3.  * @license SILK SOFTWARE HOUSE Sp. Z O. O.
  4.  */
  5. declare(strict_types=1);
  6. namespace App\Entity;
  7. use App\Entity\Traits\IdTrait;
  8. use App\Entity\Traits\TimePreUpdateTrait;
  9. use App\Entity\Traits\TimeTrait;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * Class ProjectInformation.
  13.  *
  14.  * @ORM\Table("project_information")
  15.  * @ORM\Entity(repositoryClass="App\Repository\ProjectSettingRepository")
  16.  * @ORM\HasLifecycleCallbacks()
  17.  */
  18. class ProjectInformation
  19. {
  20.     use IdTrait;
  21.     use TimeTrait;
  22.     use TimePreUpdateTrait;
  23.     /**
  24.      * Key.
  25.      *
  26.      * @var string|null
  27.      *
  28.      * @ORM\Column(name="heading", type="text", nullable=true, options={"comment": "Information key."})*
  29.      */
  30.     private ?string $heading '';
  31.     /**
  32.      * Value.
  33.      *
  34.      * @var string|null
  35.      *
  36.      * @ORM\Column(name="content", type="text", nullable=true, options={"comment": "Information value."})
  37.      */
  38.     private ?string $content '';
  39.     /**
  40.      * Measurement.
  41.      *
  42.      * @var Measurement|null
  43.      *
  44.      * @ORM\ManyToOne(targetEntity="App\Entity\Measurement", inversedBy="projectInformation")
  45.      *
  46.      * @ORM\JoinColumn(name="measurement_id", nullable=false)
  47.      */
  48.     private ?Measurement $measurement null;
  49.     /**
  50.      * @ORM\Column(name="default_info", type="boolean", nullable=false)
  51.      */
  52.     private bool $defaultInfo false;
  53.     /**
  54.      * Get heading.
  55.      *
  56.      * @return string|null
  57.      */
  58.     public function getHeading(): ?string
  59.     {
  60.         return $this->heading;
  61.     }
  62.     /**
  63.      * Set heading.
  64.      *
  65.      * @param string|null $heading
  66.      *
  67.      * @return ProjectInformation
  68.      */
  69.     public function setHeading(?string $heading): self
  70.     {
  71.         $this->heading $heading;
  72.         return $this;
  73.     }
  74.     /**
  75.      * Get content.
  76.      *
  77.      * @return string|null
  78.      */
  79.     public function getContent(): ?string
  80.     {
  81.         return $this->content;
  82.     }
  83.     /**
  84.      * Set content.
  85.      *
  86.      * @param string|null $content
  87.      *
  88.      * @return ProjectInformation
  89.      */
  90.     public function setContent(?string $content): self
  91.     {
  92.         $this->content $content;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Get measurement.
  97.      *
  98.      * @return Measurement|null
  99.      */
  100.     public function getMeasurement(): ?Measurement
  101.     {
  102.         return $this->measurement;
  103.     }
  104.     /**
  105.      * Set measurement.
  106.      *
  107.      * @param Measurement|null $measurement
  108.      *
  109.      * @return ProjectInformation
  110.      */
  111.     public function setMeasurement(?Measurement $measurement): self
  112.     {
  113.         $this->measurement $measurement;
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return bool|null
  118.      */
  119.     public function getDefaultInfo(): ?bool
  120.     {
  121.         return $this->defaultInfo;
  122.     }
  123.     /**
  124.      * @param bool $defaultInfo
  125.      *
  126.      * @return $this
  127.      */
  128.     public function setDefaultInfo(bool $defaultInfo): self
  129.     {
  130.         $this->defaultInfo $defaultInfo;
  131.         return $this;
  132.     }
  133. }