src/Entity/SectionInfo.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Identifiable;
  4. use App\Repository\SectionInfoRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassSectionInfoRepository::class)]
  7. class SectionInfo
  8. {
  9.     use Identifiable;
  10.     #[ORM\Column(type'string'length100nullabletrue)]
  11.     private $sogeCommerceId;
  12.     #[ORM\OneToOne(inversedBy'sectionInfo'targetEntitySection::class)]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private $section;
  15.     #[ORM\Column(type'string'length100nullabletrue)]
  16.     private $email;
  17.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  18.     private $darkIcon;
  19.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  20.     private $lightIcon;
  21.     #[ORM\Column(type'text'nullabletrue)]
  22.     private $purchaseShopDescription;
  23.     #[ORM\Column(type'text'nullabletrue)]
  24.     private $rentalShopDescription;
  25.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  26.     private $validationPicture;
  27.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  28.     private $rib;
  29.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  30.     private $profilingPicture;
  31.     #[ORM\Column(type'text'nullabletrue)]
  32.     private $profilingText;
  33.     #[ORM\OneToOne(targetEntityFileSectionImage::class, cascade: ['persist''remove'])]
  34.     private $communityPicture;
  35.     #[ORM\Column(type'text'nullabletrue)]
  36.     private $communityText;
  37.     #[ORM\Column(options: ['default' => false])]
  38.     private ?bool $benefactorTunnelDefault false;
  39.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  40.     private ?FileSectionImage $benefactorTunnelThanksLetterFile null;
  41.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  42.     private ?FileSectionDocument $rgpdDocument null;
  43.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  44.     private ?FileSectionDocument $insuranceDocument null;
  45.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  46.     private ?FileSectionDocument $tosDocument null;
  47.     public function getSection(): ?Section
  48.     {
  49.         return $this->section;
  50.     }
  51.     public function setSection(Section $section): self
  52.     {
  53.         $this->section $section;
  54.         return $this;
  55.     }
  56.     public function getSogeCommerceId(): ?string
  57.     {
  58.         return $this->sogeCommerceId;
  59.     }
  60.     public function setSogeCommerceId(?string $sogeCommerceId): self
  61.     {
  62.         $this->sogeCommerceId $sogeCommerceId;
  63.         return $this;
  64.     }
  65.     public function getEmail(): ?string
  66.     {
  67.         return $this->email;
  68.     }
  69.     public function setEmail(?string $email): self
  70.     {
  71.         $this->email $email;
  72.         return $this;
  73.     }
  74.     public function getDarkIcon(): ?FileSectionImage
  75.     {
  76.         return $this->darkIcon;
  77.     }
  78.     public function setDarkIcon(?FileSectionImage $darkIcon): self
  79.     {
  80.         $this->darkIcon $darkIcon;
  81.         return $this;
  82.     }
  83.     public function getLightIcon(): ?FileSectionImage
  84.     {
  85.         return $this->lightIcon;
  86.     }
  87.     public function setLightIcon(?FileSectionImage $lightIcon): self
  88.     {
  89.         $this->lightIcon $lightIcon;
  90.         return $this;
  91.     }
  92.     public function getPurchaseShopDescription(): ?string
  93.     {
  94.         return $this->purchaseShopDescription;
  95.     }
  96.     public function setPurchaseShopDescription(?string $purchaseShopDescription): self
  97.     {
  98.         $this->purchaseShopDescription $purchaseShopDescription;
  99.         return $this;
  100.     }
  101.     public function getRentalShopDescription(): ?string
  102.     {
  103.         return $this->rentalShopDescription;
  104.     }
  105.     public function setRentalShopDescription(?string $rentalShopDescription): self
  106.     {
  107.         $this->rentalShopDescription $rentalShopDescription;
  108.         return $this;
  109.     }
  110.     public function getValidationPicture(): ?FileSectionImage
  111.     {
  112.         return $this->validationPicture;
  113.     }
  114.     public function setValidationPicture(?FileSectionImage $validationPicture): self
  115.     {
  116.         $this->validationPicture $validationPicture;
  117.         return $this;
  118.     }
  119.     public function getRib(): ?FileSectionImage
  120.     {
  121.         return $this->rib;
  122.     }
  123.     public function setRib(?FileSectionImage $rib): self
  124.     {
  125.         $this->rib $rib;
  126.         return $this;
  127.     }
  128.     public function getProfilingPicture(): ?FileSectionImage
  129.     {
  130.         return $this->profilingPicture;
  131.     }
  132.     public function setProfilingPicture(?FileSectionImage $profilingPicture): self
  133.     {
  134.         $this->profilingPicture $profilingPicture;
  135.         return $this;
  136.     }
  137.     public function getProfilingText(): ?string
  138.     {
  139.         return $this->profilingText;
  140.     }
  141.     public function setProfilingText(?string $profilingText): self
  142.     {
  143.         $this->profilingText $profilingText;
  144.         return $this;
  145.     }
  146.     public function isSetupCompleted(): bool
  147.     {
  148.         return (
  149.                 ($this->getSogeCommerceId() ? 0) +
  150.                 ($this->getEmail() ? 0) +
  151.                 ($this->getDarkIcon() ? 0) +
  152.                 ($this->getLightIcon() ? 0) +
  153.                 ($this->getValidationPicture() ? 0) +
  154.                 ($this->getRib() ? 0) +
  155.                 ($this->getProfilingPicture() ? 0) +
  156.                 ($this->getProfilingText() ? 0) +
  157.                 ($this->getCommunityPicture() ? 0) +
  158.                 ($this->getCommunityText() ? 0) +
  159.                 ($this->getTosDocument() ? 0) +
  160.                 ($this->getInsuranceDocument() ? 0)
  161.             ) === 12;
  162.     }
  163.     public function getCommunityPicture(): ?FileSectionImage
  164.     {
  165.         return $this->communityPicture;
  166.     }
  167.     public function setCommunityPicture(?FileSectionImage $communityPicture): self
  168.     {
  169.         $this->communityPicture $communityPicture;
  170.         return $this;
  171.     }
  172.     public function getCommunityText(): ?string
  173.     {
  174.         return $this->communityText;
  175.     }
  176.     public function setCommunityText(?string $communityText): self
  177.     {
  178.         $this->communityText $communityText;
  179.         return $this;
  180.     }
  181.     public function isBenefactorTunnelDefault(): ?bool
  182.     {
  183.         return $this->benefactorTunnelDefault;
  184.     }
  185.     public function setBenefactorTunnelDefault(bool $benefactorTunnelDefault): self
  186.     {
  187.         $this->benefactorTunnelDefault $benefactorTunnelDefault;
  188.         return $this;
  189.     }
  190.     public function getBenefactorTunnelThanksLetterFile(): ?FileSectionImage
  191.     {
  192.         return $this->benefactorTunnelThanksLetterFile;
  193.     }
  194.     public function setBenefactorTunnelThanksLetterFile(?FileSectionImage $benefactorTunnelThanksLetterFile): self
  195.     {
  196.         $this->benefactorTunnelThanksLetterFile $benefactorTunnelThanksLetterFile;
  197.         return $this;
  198.     }
  199.     public function getRgpdDocument(): ?FileSectionDocument
  200.     {
  201.         return $this->rgpdDocument;
  202.     }
  203.     public function setRgpdDocument(?FileSectionDocument $rgpdDocument): self
  204.     {
  205.         $this->rgpdDocument $rgpdDocument;
  206.         return $this;
  207.     }
  208.     public function getInsuranceDocument(): ?FileSectionDocument
  209.     {
  210.         return $this->insuranceDocument;
  211.     }
  212.     public function setInsuranceDocument(?FileSectionDocument $insuranceDocument): self
  213.     {
  214.         $this->insuranceDocument $insuranceDocument;
  215.         return $this;
  216.     }
  217.     public function getTosDocument(): ?FileSectionDocument
  218.     {
  219.         return $this->tosDocument;
  220.     }
  221.     public function setTosDocument(?FileSectionDocument $tosDocument): self
  222.     {
  223.         $this->tosDocument $tosDocument;
  224.         return $this;
  225.     }
  226. }