src/Entity/UpdateChecker.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UpdateCheckerRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassUpdateCheckerRepository::class)]
  8. class UpdateChecker
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length32)]
  15.     private ?string $type null;
  16.     #[ORM\Column(typeTypes::TEXT)]
  17.     private ?string $update_data null;
  18.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  19.     private ?string $git_data null;
  20.      #[ORM\OneToOne(mappedBy'updateChecker'targetEntityProduct::class)]
  21.      protected Product $product;
  22.     #[ORM\Column]
  23.     private ?DateTimeImmutable $created_at null;
  24.     #[ORM\Column(options: ['default' => true])]
  25.     private ?bool $ratingAktiv null;
  26.     #[ORM\Column(options: ['default' => true])]
  27.     private ?bool $languageAktiv null;
  28.     #[ORM\Column(length64nullabletrueoptions: ['default' => 'custom_section'])]
  29.     private ?string $tabBezeichnung null;
  30.     #[ORM\Column(options: ['default' => true])]
  31.     private ?bool $aktive null;
  32.     public function __construct()
  33.     {
  34.         $this->created_at = new DateTimeImmutable();
  35.         $this->aktive true;
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getType(): ?string
  42.     {
  43.         return $this->type;
  44.     }
  45.     public function setType(string $type): self
  46.     {
  47.         $this->type $type;
  48.         return $this;
  49.     }
  50.     public function getUpdateData(): ?string
  51.     {
  52.         return $this->update_data;
  53.     }
  54.     public function setUpdateData(string $update_data): self
  55.     {
  56.         $this->update_data $update_data;
  57.         return $this;
  58.     }
  59.     public function getCreatedAt(): ?DateTimeImmutable
  60.     {
  61.         return $this->created_at;
  62.     }
  63.     public function setCreatedAt(DateTimeImmutable $created_at): self
  64.     {
  65.         $this->created_at $created_at;
  66.         return $this;
  67.     }
  68.     public function getProduct(): ?Product
  69.     {
  70.         return $this->product;
  71.     }
  72.     public function setProduct(?Product $product): self
  73.     {
  74.         // unset the owning side of the relation if necessary
  75.         if ($product === null && $this->product !== null) {
  76.             $this->product->setUpdateChecker(null);
  77.         }
  78.         // set the owning side of the relation if necessary
  79.         if ($product !== null && $product->getUpdateChecker() !== $this) {
  80.             $product->setUpdateChecker($this);
  81.         }
  82.         $this->product $product;
  83.         return $this;
  84.     }
  85.     public function getGitData(): ?string
  86.     {
  87.         if(!$this->git_data){
  88.             return '';
  89.         }
  90.         return $this->git_data;
  91.     }
  92.     public function setGitData(string $git_data): self
  93.     {
  94.         $this->git_data $git_data;
  95.         return $this;
  96.     }
  97.     public function isRatingAktiv(): ?bool
  98.     {
  99.         return $this->ratingAktiv;
  100.     }
  101.     public function setRatingAktiv(bool $ratingAktiv): self
  102.     {
  103.         $this->ratingAktiv $ratingAktiv;
  104.         return $this;
  105.     }
  106.     public function isLanguageAktiv(): ?bool
  107.     {
  108.         return $this->languageAktiv;
  109.     }
  110.     public function setLanguageAktiv(bool $languageAktiv): self
  111.     {
  112.         $this->languageAktiv $languageAktiv;
  113.         return $this;
  114.     }
  115.     public function getTabBezeichnung(): ?string
  116.     {
  117.         return $this->tabBezeichnung;
  118.     }
  119.     public function setTabBezeichnung(?string $tabBezeichnung): self
  120.     {
  121.         $this->tabBezeichnung $tabBezeichnung;
  122.         return $this;
  123.     }
  124.     public function isAktive(): ?bool
  125.     {
  126.         return $this->aktive;
  127.     }
  128.     public function setAktive(bool $aktive): self
  129.     {
  130.         $this->aktive $aktive;
  131.         return $this;
  132.     }
  133. }