<?php
namespace App\Entity;
use App\Entity\Traits\Identifiable;
use App\Repository\SectionInfoRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SectionInfoRepository::class)]
class SectionInfo
{
use Identifiable;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $sogeCommerceId;
#[ORM\OneToOne(inversedBy: 'sectionInfo', targetEntity: Section::class)]
#[ORM\JoinColumn(nullable: false)]
private $section;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $email;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $darkIcon;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $lightIcon;
#[ORM\Column(type: 'text', nullable: true)]
private $purchaseShopDescription;
#[ORM\Column(type: 'text', nullable: true)]
private $rentalShopDescription;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $validationPicture;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $rib;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $profilingPicture;
#[ORM\Column(type: 'text', nullable: true)]
private $profilingText;
#[ORM\OneToOne(targetEntity: FileSectionImage::class, cascade: ['persist', 'remove'])]
private $communityPicture;
#[ORM\Column(type: 'text', nullable: true)]
private $communityText;
#[ORM\Column(options: ['default' => false])]
private ?bool $benefactorTunnelDefault = false;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?FileSectionImage $benefactorTunnelThanksLetterFile = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?FileSectionDocument $rgpdDocument = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?FileSectionDocument $insuranceDocument = null;
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
private ?FileSectionDocument $tosDocument = null;
public function getSection(): ?Section
{
return $this->section;
}
public function setSection(Section $section): self
{
$this->section = $section;
return $this;
}
public function getSogeCommerceId(): ?string
{
return $this->sogeCommerceId;
}
public function setSogeCommerceId(?string $sogeCommerceId): self
{
$this->sogeCommerceId = $sogeCommerceId;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getDarkIcon(): ?FileSectionImage
{
return $this->darkIcon;
}
public function setDarkIcon(?FileSectionImage $darkIcon): self
{
$this->darkIcon = $darkIcon;
return $this;
}
public function getLightIcon(): ?FileSectionImage
{
return $this->lightIcon;
}
public function setLightIcon(?FileSectionImage $lightIcon): self
{
$this->lightIcon = $lightIcon;
return $this;
}
public function getPurchaseShopDescription(): ?string
{
return $this->purchaseShopDescription;
}
public function setPurchaseShopDescription(?string $purchaseShopDescription): self
{
$this->purchaseShopDescription = $purchaseShopDescription;
return $this;
}
public function getRentalShopDescription(): ?string
{
return $this->rentalShopDescription;
}
public function setRentalShopDescription(?string $rentalShopDescription): self
{
$this->rentalShopDescription = $rentalShopDescription;
return $this;
}
public function getValidationPicture(): ?FileSectionImage
{
return $this->validationPicture;
}
public function setValidationPicture(?FileSectionImage $validationPicture): self
{
$this->validationPicture = $validationPicture;
return $this;
}
public function getRib(): ?FileSectionImage
{
return $this->rib;
}
public function setRib(?FileSectionImage $rib): self
{
$this->rib = $rib;
return $this;
}
public function getProfilingPicture(): ?FileSectionImage
{
return $this->profilingPicture;
}
public function setProfilingPicture(?FileSectionImage $profilingPicture): self
{
$this->profilingPicture = $profilingPicture;
return $this;
}
public function getProfilingText(): ?string
{
return $this->profilingText;
}
public function setProfilingText(?string $profilingText): self
{
$this->profilingText = $profilingText;
return $this;
}
public function isSetupCompleted(): bool
{
return (
($this->getSogeCommerceId() ? 1 : 0) +
($this->getEmail() ? 1 : 0) +
($this->getDarkIcon() ? 1 : 0) +
($this->getLightIcon() ? 1 : 0) +
($this->getValidationPicture() ? 1 : 0) +
($this->getRib() ? 1 : 0) +
($this->getProfilingPicture() ? 1 : 0) +
($this->getProfilingText() ? 1 : 0) +
($this->getCommunityPicture() ? 1 : 0) +
($this->getCommunityText() ? 1 : 0) +
($this->getTosDocument() ? 1 : 0) +
($this->getInsuranceDocument() ? 1 : 0)
) === 12;
}
public function getCommunityPicture(): ?FileSectionImage
{
return $this->communityPicture;
}
public function setCommunityPicture(?FileSectionImage $communityPicture): self
{
$this->communityPicture = $communityPicture;
return $this;
}
public function getCommunityText(): ?string
{
return $this->communityText;
}
public function setCommunityText(?string $communityText): self
{
$this->communityText = $communityText;
return $this;
}
public function isBenefactorTunnelDefault(): ?bool
{
return $this->benefactorTunnelDefault;
}
public function setBenefactorTunnelDefault(bool $benefactorTunnelDefault): self
{
$this->benefactorTunnelDefault = $benefactorTunnelDefault;
return $this;
}
public function getBenefactorTunnelThanksLetterFile(): ?FileSectionImage
{
return $this->benefactorTunnelThanksLetterFile;
}
public function setBenefactorTunnelThanksLetterFile(?FileSectionImage $benefactorTunnelThanksLetterFile): self
{
$this->benefactorTunnelThanksLetterFile = $benefactorTunnelThanksLetterFile;
return $this;
}
public function getRgpdDocument(): ?FileSectionDocument
{
return $this->rgpdDocument;
}
public function setRgpdDocument(?FileSectionDocument $rgpdDocument): self
{
$this->rgpdDocument = $rgpdDocument;
return $this;
}
public function getInsuranceDocument(): ?FileSectionDocument
{
return $this->insuranceDocument;
}
public function setInsuranceDocument(?FileSectionDocument $insuranceDocument): self
{
$this->insuranceDocument = $insuranceDocument;
return $this;
}
public function getTosDocument(): ?FileSectionDocument
{
return $this->tosDocument;
}
public function setTosDocument(?FileSectionDocument $tosDocument): self
{
$this->tosDocument = $tosDocument;
return $this;
}
}