<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiFilter;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName;
use Symfony\Component\Validator\Constraints as Assert;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\RangeFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Domain\PropertyMatching\Adapters\Gateway\Doctrine\PropertyMatchingEntity;
use App\Controller\Manager\Property\UnderCompromisePropertyController;
use App\Controller\Manager\Property\SoldByMilkiyaPropertyController;
use App\Controller\Manager\Property\InProgressPropertyController;
use App\Controller\Manager\Property\InvalidPropertyController;
use App\Controller\Manager\Property\PendingPropertyController;
use App\Controller\Agent\Property\TechnicalDataSheetController;
use App\Entity\Reference\ReferencePropertyConstructionType;
use App\Entity\Reference\PropertyDiffusionModeReference;
use App\Entity\Reference\ReferencePropertyContractType;
use App\Entity\Reference\ReferencePropertyDestination;
use App\Entity\Reference\ReferencePropertyOrientation;
use App\Entity\Reference\ReferencePropertyServiceType;
use App\Entity\Reference\ReferencePropertyLandType;
use App\Entity\Reference\ReferencePropertyDomain;
use App\Entity\Reference\ReferencePropertyStatus;
use App\Entity\Reference\ReferencePropertyState;
use App\Entity\Reference\ReferencePropertyType;
use App\Validator\Constraints\UniqueProperty;
use App\Validator\Constraints\AreaProperty;
use App\Repository\PropertyRepository;
use App\Filter\NullablePropertyMatchingFilter;
use App\Traits\TimeStampTrait;
use DateTimeInterface;
use App\Filter\ValidMandateAdditionalPropertyFilter;
use App\EventListener\PropertyListener;
use App\Controller\Manager\Property\ArchivePropertyController;
use App\Filter\NumberOfRoomFilter;
use App\Filter\CustomBooleanFilter;
use App\Filter\TypeMandateInBiensFilter;
use App\Filter\RecommendedPropertyFilter;
/**
* @ApiResource(
* attributes={
* "pagination_client_enabled"=true,
* "pagination_items_per_page"=10,
* "order"={"id":"DESC"},
* "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"} }
* },
* normalizationContext={"groups"={"property:read"}, "swagger_definition_name"="Read"},
* denormalizationContext={
* "groups"={"property:write"},
* "swagger_definition_name"="Write",
* "skip_null_values" = true
* },
* itemOperations={
* "get" = { "security" = "is_granted('ROLE_MANAGER') or is_granted('PROPERTY_DETAILS', object)"},
* "put" = {
* "security"="is_granted('PROPERTY_EDIT', object)",
* "denormalization_context"={"groups"={"property:put"}},
* },
* "invalid_property"={
* "denormalization_context"={"groups"={"property:invalid"}},
* "access_control"="is_granted('ROLE_MANAGER')",
* "method"="PATCH",
* "path"="/property/{id}/invalid",
* "controller"=InvalidPropertyController::class,
* "read"=true,
* "write"=false,
* },
* "download_technical_data_sheet"={
* "access_control"="is_granted('ROLE_MANAGER') or is_granted('ROLE_AGENT')",
* "method"="GET",
* "path"="/property/{id}/technical_data_sheet",
* "controller"=TechnicalDataSheetController::class,
* "read"=true,
* "write"=false,
* },
* "in_progress_property"={
* "denormalization_context"={"groups"={"property:in_progress"}},
* "access_control"="is_granted('ROLE_MANAGER')",
* "method"="PATCH",
* "path"="/property/{id}/in_progress",
* "controller"=InProgressPropertyController::class,
* "read"=true,
* "write"=false,
* },
* "pending_property"={
* "denormalization_context"={"groups"={"property:in_progress"}},
* "access_control"="is_granted('ROLE_MANAGER')",
* "method"="PATCH",
* "path"="/property/{id}/pending",
* "controller"=PendingPropertyController::class,
* "read"=true,
* "write"=false,
* },
* "under_compromise_property"={
* "denormalization_context"={"groups"={"property:under_compromise"}},
* "access_control"="is_granted('ROLE_MANAGER')",
* "method"="PATCH",
* "path"="/property/{id}/under_compromise",
* "controller"=UnderCompromisePropertyController::class,
* "read"=true,
* "write"=false,
* },
* "sold_by_milkiya_property"={
* "denormalization_context"={"groups"={"property:sold_by_milkiya"}},
* "access_control"="is_granted('ROLE_MANAGER')",
* "method"="PATCH",
* "path"="/property/{id}/sold_by_milkiya",
* "controller"=SoldByMilkiyaPropertyController::class,
* "read"=true,
* "write"=false,
* },
* "archive_property"={
* "denormalization_context"={"groups"={"property:property"}},
* "access_control"="( (is_granted('ROLE_AGENT') and object.getcollaborator() === user) or
is_granted('ROLE_MANAGER') or is_granted('ROLE_IT') )",
* "method"="PATCH",
* "path"="/property/{id}/archive",
* "controller"=ArchivePropertyController::class,
* "read"=true,
* "write"=false,
* },
* },
* collectionOperations={
* "get" = { "security" = "is_granted('ROLE_AGENT') or is_granted('ROLE_MANAGER')"},
* "post" = {
* "security_post_denormalize" = "is_granted('POST', object)",
* },
* "milkiya_properties"={
* "access_control"="is_granted('PUBLIC_ACCESS')",
* "normalization_context"={"groups"={"milkiya:read"}},
* "method"="GET",
* "path"="/internal/properties",
* "pagination_enabled" = false
* },
* },
* subresourceOperations={
* "api_mandates_additional_properties_get_subresource"={
* "method"="GET",
* "security"="is_granted('ROLE_AGENT') or is_granted('ROLE_MANAGER')"
* }
* }
* )
* @ApiFilter(OrderFilter::class, properties={
* "id",
* "maximumPrice",
* "minimalPrice",
* "minimalArea",
* "maximalArea",
* "roomsNumber",
* "constructionYear"
* } , arguments= {"orderParameterName" : "order"})
*
* @ApiFilter(SearchFilter::class, properties={
* "id": "exact",
* "prescriber": "exact",
* "propertyReferenceType" : "exact",
* "collaborator.id" : "exact",
* "referenceServiceType.code":"exact",
* "referencePropertyDestination.code":"exact",
* * "referencePropertyStatus.code":"exact",
* "referenceServiceType":"exact",
* "referencePropertyDomain":"exact",
* "referencePropertyDestination":"exact",
* "propertyAddress.city": "exact",
* "propertyAddress.neighborhood": "exact",
* "referencePropertyStatus" : "exact",
* "referencePropertyType" : "exact",
* "referencePropertyContractType" : "exact",
* "contact": "exact",
* "referencePropertyDiffusionMode" : "exact"
*
* })
* @ApiFilter(RangeFilter::class, properties={
* "maximalArea",
* "maximumPrice"
* })
* @ApiFilter(TypeMandateInBiensFilter::class, properties={"mandates"})
* @ApiFilter(CustomBooleanFilter::class, properties={"isFurnished", "hasParkCar", "hasElevator"})
* @ApiFilter(NullablePropertyMatchingFilter::class, properties={"matchingEntity", "matchingEntity.deletedAt"})
* @ApiFilter(ValidMandateAdditionalPropertyFilter::class, properties={"additionalProperties"})
* @ApiFilter(NumberOfRoomFilter::class,properties={"numberOfRooms"})
* @ApiFilter (RecommendedPropertyFilter::class,properties={"recommendation"})
* @ORM\Entity(repositoryClass=PropertyRepository::class)
* @ORM\EntityListeners({PropertyListener::class})
* @ORM\HasLifecycleCallbacks()
*
* @UniqueProperty()
* @AreaProperty()
*/
class Property implements Loggable
{
use TimeStampTrait;
public const STATUS_IN_PROGRESS = 'reference.status.in_progress';
public const MODE_REFERENCE_DIFFUSION_SAROUTY = 'SAROUTY';
public const MODE_REFERENCE_DIFFUSION_AVITO = 'AVITO';
public const MODE_REFERENCE_DIFFUSION_YIELDIS = 'YIELDIS';
public const MODE_REFERENCE_DIFFUSION_MUBAWAB = 'MUBAWAB';
public const MODE_REFERENCE_DIFFUSION_AGENZ = 'AGENZ';
public const MODE_REFERENCE_DIFFUSION_MULTILIST = 'MULTILIST';
public const REFERENCE_STATUS_IN_PROGRESS = '0';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*
* @Groups({
* "property:read",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "contact:read",
* "property-visit:read"
* })
*/
private $id;
/**
* @ORM\Column(type="float", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "milkiya:read",
* "contact:read",
* "contact:read",
* "property-visit:read",
* })
*
*/
private ?float $maximalArea;
/**
* @ORM\Column(type="float", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?float $minimalArea;
/**
* @ORM\Column(type="float", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?float $minimalPrice;
/**
* @ORM\Column(type="float",nullable=false)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* "contact:read",
* "property-visit:read"
* })
*
* @Assert\GreaterThanOrEqual(
* propertyPath="minimalPrice",
* message="max price must be greater than min price."
* )
*
*/
private ?float $maximumPrice;
/**
* @deprecated
* @ORM\Column(type="integer",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
* Nombre des pieces
*/
private ?int $roomsNumber;
/**
* @ORM\Column(type="boolean",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?bool $isAvailable;
/**
* @ORM\Column(type="date_immutable",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "milkiya:read"
* })
*/
private ?DateTimeInterface $dateAvailability;
/**
* @ORM\Column(type="date_immutable",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?DateTimeInterface $constructionYear;
/**
* @ORM\Column(type="integer",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?int $floorsNumber;
/**
* @ORM\Column(type="boolean")
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $isFurnished = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasGuardian;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?bool $hasIntercom;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasElevator;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?bool $hasTerrace;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasBalcony;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
*
* })
*
*/
private ?bool $hasGarage;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasParkCar;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasParkCarOutside;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*
*/
private ?bool $hasCellar;
/**
* @ORM\Column(type="boolean")
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?bool $hasBasement;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?bool $hasBathroom;
/**
* @ORM\Column(type="text")
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read"
* })
*/
private ?string $description;
/**
* @ORM\OneToOne(targetEntity=PropertyAddress::class, inversedBy="property", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false)
* @Assert\NotBlank
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "property-visit:read",
* "milkiya:read",
* "business-indication:item:read",
* "contact:read"
* })
* @App\Validator\Neighborhood()
*/
private ?PropertyAddress $propertyAddress;
/**
* @ORM\ManyToOne(targetEntity=Agent::class, inversedBy="properties")
*
* @Groups({
* "property:read","mandate:read",
* "transaction-item:read","siege:write","siege:put",
* "milkiya:read",
* "business-indication:item:read",
* })
*
*/
private ?Agent $collaborator;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?DateTimeInterface $archivedAt;
/**
* @ORM\ManyToOne(targetEntity=Contact::class, inversedBy="properties",cascade={"persist"})
*
* @Groups({
* "property:read","property:write","property:put",
* "transaction-item:read",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "property-visit:read"
*
* })
*/
private ?Contact $contact;
/**
* @ORM\OneToMany(
* targetEntity="App\Entity\PropertyImages",
* mappedBy="property",cascade={"persist"},
* orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
* @ORM\OrderBy({"position"="Asc"})
* @Groups({"property:read","milkiya:read"})
*/
private $images;
/**
* @ORM\OneToMany(targetEntity=Mandate::class, mappedBy="property")
* @Groups({
* "property:read"
* })
*/
private $mandates;
/**
* @ORM\ManyToOne(targetEntity=Prescriber::class, inversedBy="properties",cascade={"persist"})
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read"
* })
*/
private ?Prescriber $prescriber;
/**
* @ORM\ManyToOne(targetEntity=Manager::class, inversedBy="properties")
* @Groups({
* "mandate:read"
* })
*/
private ?Manager $manager;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyDomain::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read"
* })
*
*/
private ?ReferencePropertyDomain $referencePropertyDomain;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyState::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* "property-visit:read",
* })
*/
private ?ReferencePropertyState $refrencePropertyState;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyContractType::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "milkiya:read",
* "property-visit:read"
* })
*/
private ?ReferencePropertyContractType $referencePropertyContractType;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyLandType::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "business-indication:item:read",
* "milkiya:read",
* "property-visit:read"
* })
*/
private ?ReferencePropertyLandType $referencePropertyLandType;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyDestination::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* "property-visit:read"
* })
*/
private ?ReferencePropertyDestination $referencePropertyDestination;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyConstructionType::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read"
* })
*/
private ?ReferencePropertyConstructionType $referencePropertyConstructionType;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyOrientation::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read"
* })
*/
private ?ReferencePropertyOrientation $referencePropertyOrientationType;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyStatus::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=false)
* @Groups({
* "property:read","siege:write","siege:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?ReferencePropertyStatus $referencePropertyStatus;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyServiceType::class, inversedBy="properties")
* @ORM\JoinColumn(nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* "property-visit:read"
* })
*/
private ?ReferencePropertyServiceType $referenceServiceType;
/**
* @ORM\ManyToOne(targetEntity=ReferencePropertyType::class)
* @ORM\JoinColumn(nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read",
* "contact:read",
* "property-visit:read"
* })
*/
private ?ReferencePropertyType $referencePropertyType;
/**
* @ORM\ManyToOne(targetEntity=Agent::class, inversedBy="recommandations")
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read"
* })
*/
private $recommendation;
/**
* @var Collection |null
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read"
* })
*
* @ORM\OneToMany(targetEntity=PropertyMatchingEntity::class, mappedBy="property")
*/
private ?Collection $matchingEntity = null;
/**
* @ORM\ManyToMany(targetEntity=PropertyDiffusionModeReference::class)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read"
* })
*/
private $referencePropertyDiffusionMode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "business-indication:item:read"
* })
*/
private ?string $propertyTitleNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "business-indication:item:read"
* })
*/
private ?string $bookingNumber;
/**
* @ORM\OneToMany(
* targetEntity="App\Entity\CertificateOfOwnershipFile",
* mappedBy="property",
* cascade={"persist"},
* orphanRemoval=true)
* @ORM\JoinColumn(nullable=true)
* @Groups({"property:read","mandate:read"})
*/
private $propertyFiles = null;
/**
* @ORM\Column(type="integer",nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read"
* })
*
*/
private ?int $floor;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read",
* "business-indication:item:read"
* })
*/
private ?int $bathroomNumber;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
*
* })
*/
private ?int $numberOfRooms;
/**
* @ORM\Column(type="integer", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?int $numberOfPieces;
/**
* @ORM\OneToMany(targetEntity=PropertyDescription::class, mappedBy="property",cascade={"all"})
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private $propertyDescriptions;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @Groups({
* "milkiya:read","property:read"
* })
*/
private ?string $reference;
/**
* @ORM\ManyToMany(targetEntity=Agent::class)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private $agentsSharedWith;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read",
* "transaction-item:read",
* "milkiya:read"
* })
*/
private ?bool $isShared = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put"
* })
*/
private ?bool $hasTitledParking = false;
/**
* @ORM\Column(type="float", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put"
* })
*/
private ?float $parkingArea;
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put"
* })
*/
private ?bool $hasMezzanine = false;
/**
* @ORM\Column(type="float", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put"
* })
*
*/
private ?float $mezzanineArea;
/**
* @ORM\Column(type="text", nullable=true)
*
* @Groups({
* "property:read","property:write","property:put"
* })
*/
private ?string $descriptionMandate;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read"
* })
*/
private ?bool $isShortTermRental = null;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read"
* })
*/
private ?DateTimeInterface $dateStartRental = null;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({
* "property:read","property:write","property:put",
* "mandate:read"
* })
*/
private ?DateTimeInterface $dateEndRental = null;
/**
* @ORM\Column(type="string",nullable=true)
*
* @Groups({"property:read", "property:write","property:put", "milkiya:read"})
*/
private ?string $videoLink;
public function __construct()
{
$this->mandates = new ArrayCollection();
$this->referencePropertyDiffusionMode = new ArrayCollection();
$this->propertyFiles = new ArrayCollection();
$this->propertyDescriptions = new ArrayCollection();
$this->matchingEntity = new ArrayCollection();
$this->agentsSharedWith = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): self
{
$this->id = $id;
return $this;
}
public function getMaximalArea(): ?float
{
return $this->maximalArea;
}
public function setMaximalArea(?float $maximalArea): self
{
$this->maximalArea = $maximalArea;
return $this;
}
public function getMinimalArea(): ?float
{
return $this->minimalArea;
}
public function setMinimalArea(?float $minimalArea): self
{
$this->minimalArea = $minimalArea;
return $this;
}
public function getMinimalPrice(): ?float
{
return $this->minimalPrice;
}
public function setMinimalPrice(?float $minimalPrice): self
{
$this->minimalPrice = $minimalPrice;
return $this;
}
public function getMaximumPrice(): ?float
{
return $this->maximumPrice;
}
public function setMaximumPrice(float $maximumPrice): self
{
$this->maximumPrice = $maximumPrice;
return $this;
}
public function getRoomsNumber(): ?int
{
return $this->roomsNumber;
}
public function setRoomsNumber(?int $roomsNumber): self
{
$this->roomsNumber = $roomsNumber;
return $this;
}
public function getIsAvailable(): ?bool
{
return $this->isAvailable;
}
public function setIsAvailable(bool $isAvailable): self
{
$this->isAvailable = $isAvailable;
return $this;
}
public function getIsFurnished(): ?bool
{
return $this->isFurnished;
}
public function setIsFurnished(bool $isFurnished): self
{
$this->isFurnished = $isFurnished;
return $this;
}
public function getDateAvailability(): ?DateTimeInterface
{
return $this->dateAvailability;
}
public function setDateAvailability(?DateTimeInterface $dateAvailability): self
{
$this->dateAvailability = $dateAvailability;
return $this;
}
public function getConstructionYear(): ?DateTimeInterface
{
return $this->constructionYear;
}
public function setConstructionYear(?DateTimeInterface $constructionYear): self
{
$this->constructionYear = $constructionYear;
return $this;
}
public function getFloorsNumber(): ?int
{
return $this->floorsNumber;
}
public function setFloorsNumber(?int $floorsNumber): self
{
$this->floorsNumber = $floorsNumber;
return $this;
}
public function getHasGuardian(): ?bool
{
return $this->hasGuardian;
}
public function setHasGuardian(bool $hasGuardian): self
{
$this->hasGuardian = $hasGuardian;
return $this;
}
public function getHasIntercom(): ?bool
{
return $this->hasIntercom;
}
public function setHasIntercom(bool $hasIntercom): self
{
$this->hasIntercom = $hasIntercom;
return $this;
}
public function getHasElevator(): ?bool
{
return $this->hasElevator;
}
public function setHasElevator(bool $hasElevator): self
{
$this->hasElevator = $hasElevator;
return $this;
}
public function getHasTerrace(): ?bool
{
return $this->hasTerrace;
}
public function setHasTerrace(bool $hasTerrace): self
{
$this->hasTerrace = $hasTerrace;
return $this;
}
public function getHasBalcony(): ?bool
{
return $this->hasBalcony;
}
public function setHasBalcony(bool $hasBalcony): self
{
$this->hasBalcony = $hasBalcony;
return $this;
}
public function getHasGarage(): ?bool
{
return $this->hasGarage;
}
public function setHasGarage(bool $hasGarage): self
{
$this->hasGarage = $hasGarage;
return $this;
}
public function getHasParkCar(): ?bool
{
return $this->hasParkCar;
}
public function setHasParkCar(bool $hasParkCar): self
{
$this->hasParkCar = $hasParkCar;
return $this;
}
public function getHasParkCarOutside(): ?bool
{
return $this->hasParkCarOutside;
}
public function setHasParkCarOutside(bool $hasParkCarOutside): self
{
$this->hasParkCarOutside = $hasParkCarOutside;
return $this;
}
public function getHasCellar(): ?bool
{
return $this->hasCellar;
}
public function setHasCellar(bool $hasCellar): self
{
$this->hasCellar = $hasCellar;
return $this;
}
public function getHasBasement(): ?bool
{
return $this->hasBasement;
}
public function setHasBasement(bool $hasBasement): self
{
$this->hasBasement = $hasBasement;
return $this;
}
public function getCollaborator(): ?Agent
{
return $this->collaborator;
}
public function setCollaborator(?Agent $collaborator): self
{
$this->collaborator = $collaborator;
return $this;
}
public function getArchivedAt(): ?DateTimeInterface
{
return $this->archivedAt;
}
public function setArchivedAt(?DateTimeInterface $archivedAt): self
{
$this->archivedAt = $archivedAt;
return $this;
}
public function getReferencePropertyType(): ?ReferencePropertyType
{
return $this->referencePropertyType;
}
public function setReferencePropertyType(?ReferencePropertyType $referencePropertyType): self
{
$this->referencePropertyType = $referencePropertyType;
return $this;
}
public function getReferencePropertyConstructionType(): ?ReferencePropertyConstructionType
{
return $this->referencePropertyConstructionType;
}
public function setReferencePropertyConstructionType(
?ReferencePropertyConstructionType $referencePropertyConstructionType
): self {
$this->referencePropertyConstructionType = $referencePropertyConstructionType;
return $this;
}
public function getReferencePropertyOrientationType(): ?ReferencePropertyOrientation
{
return $this->referencePropertyOrientationType;
}
public function setReferencePropertyOrientationType(
?ReferencePropertyOrientation $referencePropertyOrientationType
): self {
$this->referencePropertyOrientationType = $referencePropertyOrientationType;
return $this;
}
public function getPropertyAddress(): ?PropertyAddress
{
return $this->propertyAddress;
}
public function setPropertyAddress(PropertyAddress $propertyAddress): self
{
$this->propertyAddress = $propertyAddress;
return $this;
}
public function getContact(): ?Contact
{
return $this->contact;
}
public function setContact(?Contact $contact): self
{
$this->contact = $contact;
return $this;
}
/**
* @return int
*/
public function getNumberUnarchivedImages(): int
{
$count = 0;
foreach ($this->images as $img) {
$img->getArchived() === false ? $count++ : null;
}
return $count;
}
/**
* @return Collection|PropertyImages[]
*/
public function getImages(): Collection
{
$imageInarchive = new ArrayCollection();
foreach ($this->images as $img) {
$img->getArchived() === false ? $imageInarchive[] = $img : null;
}
return $imageInarchive;
}
/**
* @param PropertyImages $image
* @return $this
*/
public function addImage(PropertyImages $image): self
{
if (!$this->images->contains($image)) {
$this->images[] = $image;
$image->setProperty($this);
}
return $this;
}
/**
* @param PropertyImages $image
* @return $this
*/
public function removeImage(PropertyImages $image): self
{
// set the owning side to null (unless already changed)
if ($this->images->removeElement($image) && $image->getProperty() === $this) {
$image->setProperty(null);
}
return $this;
}
/**
* @return Collection|Mandate[]
*/
public function getMandates(): Collection
{
return $this->mandates->filter(function ($arrayItem) {
return !in_array(
$arrayItem->getReferenceMandateStatus()->getCode(),
Mandate::REFERENCE_MANDATE_STATUS_CODE_INVALID,
false
);
});
}
public function addMandate(Mandate $mandate): self
{
if (!$this->mandates->contains($mandate)) {
$this->mandates[] = $mandate;
$mandate->setProperty($this);
}
return $this;
}
public function removeMandate(Mandate $mandate): self
{
// set the owning side to null (unless already changed)
if ($this->mandates->removeElement($mandate) && $mandate->getProperty() === $this) {
$mandate->setProperty(null);
}
return $this;
}
public function getPropertyFiles(): ?Collection
{
return $this->propertyFiles;
}
public function addPropertyFiles(CertificateOfOwnershipFile $certificateOfOwnershipFile): self
{
if (!$this->propertyFiles->contains($certificateOfOwnershipFile)) {
$this->propertyFiles[] = $certificateOfOwnershipFile;
$certificateOfOwnershipFile->setProperty($this);
}
return $this;
}
public function removePropertyFiles(CertificateOfOwnershipFile $certificateOfOwnershipFile): self
{
if ($this->propertyFiles->removeElement($certificateOfOwnershipFile)) {
if ($certificateOfOwnershipFile->getProperty() === $this) {
$certificateOfOwnershipFile->setProperty(null);
}
}
return $this;
}
public function getPrescriber(): ?Prescriber
{
return $this->prescriber;
}
public function setPrescriber(?Prescriber $prescriber): self
{
$this->prescriber = $prescriber;
return $this;
}
public function getReferencePropertyStatus(): ?ReferencePropertyStatus
{
return $this->referencePropertyStatus;
}
public function setReferencePropertyStatus(?ReferencePropertyStatus $referencePropertyStatus): self
{
$this->referencePropertyStatus = $referencePropertyStatus;
return $this;
}
public function getManager(): ?Manager
{
return $this->manager;
}
public function setManager(?Manager $manager): self
{
$this->manager = $manager;
return $this;
}
public function getReferenceServiceType(): ?ReferencePropertyServiceType
{
return $this->referenceServiceType;
}
public function setReferenceServiceType(?ReferencePropertyServiceType $referenceServiceType): self
{
$this->referenceServiceType = $referenceServiceType;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getReferencePropertyDomain(): ?ReferencePropertyDomain
{
return $this->referencePropertyDomain;
}
public function setReferencePropertyDomain(?ReferencePropertyDomain $referencePropertyDomain): self
{
$this->referencePropertyDomain = $referencePropertyDomain;
return $this;
}
public function getRefrencePropertyState(): ?ReferencePropertyState
{
return $this->refrencePropertyState;
}
public function setRefrencePropertyState(?ReferencePropertyState $refrencePropertyState): self
{
$this->refrencePropertyState = $refrencePropertyState;
return $this;
}
public function getReferencePropertyContractType(): ?ReferencePropertyContractType
{
return $this->referencePropertyContractType;
}
public function setReferencePropertyContractType(
?ReferencePropertyContractType $referencePropertyContractType
): self {
$this->referencePropertyContractType = $referencePropertyContractType;
return $this;
}
public function getReferencePropertyLandType(): ?ReferencePropertyLandType
{
return $this->referencePropertyLandType;
}
public function setReferencePropertyLandType(?ReferencePropertyLandType $referencePropertyLandType): self
{
$this->referencePropertyLandType = $referencePropertyLandType;
return $this;
}
public function getReferencePropertyDestination(): ?ReferencePropertyDestination
{
return $this->referencePropertyDestination;
}
public function setReferencePropertyDestination(?ReferencePropertyDestination $referencePropertyDestination): self
{
$this->referencePropertyDestination = $referencePropertyDestination;
return $this;
}
public function getRecommendation()
{
return $this->recommendation;
}
public function setRecommendation(?Agent $recommendation): self
{
$this->recommendation = $recommendation;
return $this;
}
/**
* @return Collection|PropertyMatchingEntity[]
*/
public function getMatchingEntity(): Collection
{
return $this->matchingEntity;
}
/**
* @return bool
* @SerializedName("hasValidMandate")
* @Groups({
* "property:read","property:write","property:put",
* "transaction-item:read",
* "mandate:read",
* "transaction-item:read"
* })
*/
public function hasValidMandate(): bool
{
foreach ($this->mandates as $mandate) {
if (
!in_array(
$mandate->getReferenceMandateStatus()->getCode(),
Mandate::REFERENCE_MANDATE_STATUS_CODE_INVALID
)
) {
return true;
}
}
return false;
}
/**
* @return bool
* @SerializedName("hasValidMandateWithoutCheckAdditionalProperty")
* @Groups({
* "property:read","property:write","property:put",
* "transaction-item:read",
* "mandate:read",
* "transaction-item:read"
* })
*/
public function hasValidMandateWithoutCheckAdditionalProperty(): bool
{
foreach ($this->mandates as $mandate) {
if (
!in_array(
$mandate->getReferenceMandateStatus()->getCode(),
Mandate::REFERENCE_MANDATE_STATUS_CODE_INVALID,
true
)
&& !$mandate->getIsAdditionalProperty()
) {
return true;
}
}
return false;
}
/**
* @SerializedName("getVMandate")
* @Groups({
* "property:read"
* })
*/
public function getVMandate()
{
return $this->mandates->filter(function ($arrayItem) {
return !in_array(
$arrayItem->getReferenceMandateStatus()->getCode(),
Mandate::REFERENCE_MANDATE_STATUS_CODE_INVALID,
false
);
})->getValues();
}
/**
* @return Collection<int, PropertyDiffusionModeReference>
*/
public function getReferencePropertyDiffusionMode(): Collection
{
return $this->referencePropertyDiffusionMode;
}
public function addReferencePropertyDiffusionMode(
PropertyDiffusionModeReference $referencePropertyDiffusionMode
): self {
if (!$this->referencePropertyDiffusionMode->contains($referencePropertyDiffusionMode)) {
$this->referencePropertyDiffusionMode[] = $referencePropertyDiffusionMode;
}
return $this;
}
public function getPropertyTitleNumber(): ?string
{
return $this->propertyTitleNumber;
}
public function setPropertyTitleNumber(?string $propertyTitleNumber): self
{
$this->propertyTitleNumber = $propertyTitleNumber;
return $this;
}
public function removeReferencePropertyDiffusionMode(
PropertyDiffusionModeReference $referencePropertyDiffusionMode
): self {
$this->referencePropertyDiffusionMode->removeElement($referencePropertyDiffusionMode);
return $this;
}
/**
* @return string|null
*/
public function getBookingNumber(): ?string
{
return $this->bookingNumber;
}
/**
* @param string|null $bookingNumber
*
* @return $this
*/
public function setBookingNumber(?string $bookingNumber): self
{
$this->bookingNumber = $bookingNumber;
return $this;
}
public function getFloor(): ?int
{
return $this->floor;
}
public function setFloor(?int $floor): self
{
$this->floor = $floor;
return $this;
}
public function isSale(): bool
{
if (null === $this->getReferenceServiceType()) {
return false;
}
return $this->getReferenceServiceType()->getCode(
) === ReferencePropertyServiceType::REFERENCE_CODE_PROPERTY_SERVICE_TYPE_SELL;
}
public function isRent(): bool
{
if (null === $this->getReferenceServiceType()) {
return false;
}
return $this->getReferenceServiceType()->getCode() ===
ReferencePropertyServiceType::REFERENCE_CODE_PROPERTY_SERVICE_TYPE_RENTAL;
}
public function isBuy(): bool
{
if (null === $this->getReferenceServiceType()) {
return false;
}
return in_array(
$this->getReferenceServiceType()->getCode(),
ReferencePropertyServiceType::ALL_REFERENCE_CODE_PROPERTY_SEARCH_TYPE,
true
);
}
public function isNew(): bool
{
if (null === $domainType = $this->getReferencePropertyDomain()) {
return false;
}
return $domainType->getCode() === ReferencePropertyDomain::REFERENCE_CODE_PROPERTY_DOMAIN_NEW;
}
public function isCommercialPropertyType(): bool
{
return $this->isCommercialProperty();
}
public function isDwellingPropertyType(): bool
{
return $this->isHabitationProperty();
}
public function isLotPropertyType(): bool
{
return $this->isLandProperty();
}
public function getBathroomNumber(): ?int
{
return $this->bathroomNumber;
}
public function setBathroomNumber(?int $bathroomNumber): self
{
$this->bathroomNumber = $bathroomNumber;
return $this;
}
public function getNumberOfRooms(): ?int
{
return $this->numberOfRooms;
}
public function setNumberOfRooms(?int $numberOfRooms): self
{
$this->numberOfRooms = $numberOfRooms;
return $this;
}
public function getNumberOfPieces(): ?int
{
return $this->numberOfPieces;
}
public function setNumberOfPieces(): self
{
$this->numberOfPieces = $this->roomsNumber;
return $this;
}
/**
* @return Collection<int, PropertyDescription>
*/
public function getPropertyDescriptions(): Collection
{
return $this->propertyDescriptions;
}
public function addPropertyDescription(PropertyDescription $propertyDescription): self
{
if (!$this->propertyDescriptions->contains($propertyDescription)) {
$this->propertyDescriptions[] = $propertyDescription;
$propertyDescription->setProperty($this);
}
return $this;
}
public function removePropertyDescription(PropertyDescription $propertyDescription): self
{
// set the owning side to null (unless already changed)
if (
$this->propertyDescriptions->removeElement($propertyDescription) &&
$propertyDescription->getProperty() === $this
) {
$propertyDescription->setProperty(null);
}
return $this;
}
public function getHasBathroom(): ?bool
{
return $this->hasBathroom;
}
public function setHasBathroom(?bool $hasBathroom): self
{
$this->hasBathroom = $hasBathroom;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
/**
* @param PropertyAddress $propertyAddress
*
* @return bool
*/
public function hasSameAddress(PropertyAddress $propertyAddress): bool
{
$address = $this->getPropertyAddress();
return $address->getCity() === $propertyAddress->getCity() &&
$address->getNeighborhood() === $propertyAddress->getNeighborhood() &&
$address->getZipCode() === $propertyAddress->getZipCode() &&
$address->getFirstAddress() === $propertyAddress->getFirstAddress();
}
/**
* @param Contact $contact
*
* @Groups({"property:read"})
*
* @return bool
*/
public function hasSameContact(Contact $contact): bool
{
return $this->getContact()->getId() === $contact->getId();
}
/**
* @param UserInterface $object
*
* @return bool
*/
public function hasSameCollaborator(UserInterface $object): bool
{
return $this->getCollaborator()->getId() === $object->getId();
}
/**
* @param ReferencePropertyServiceType $propertyServiceType
*
* @Groups({"property:read"})
*
* @return bool
*/
public function hasSamePropertyServiceType(ReferencePropertyServiceType $propertyServiceType): bool
{
return $this->getReferenceServiceType()->getCode() === $propertyServiceType->getCode();
}
/**
* @Groups({"milkiya:read"})
* @SerializedName("description")
*
* @return string|null
*/
public function getWebsiteDescription(): ?string
{
return nl2br($this->description) ?? null;
}
/**
* check if the property is a commercial property
*
* @return bool
*/
public function isCommercialProperty(): bool
{
if (null === $destination = $this->getReferencePropertyDestination()) {
return false;
}
return $destination->isCommercial();
}
/**
* check if the property is a dwelling property
*
* @return bool
*/
public function isHabitationProperty(): bool
{
if (null === $destination = $this->getReferencePropertyDestination()) {
return false;
}
return $destination->isHabitation();
}
/**
* check if the property is a land property
*
* @return bool
*/
public function isLandProperty(): bool
{
if (null === $destination = $this->getReferencePropertyDestination()) {
return false;
}
return $destination->isLand();
}
/**
* @return Collection<int, Agent>
*/
public function getAgentsSharedWith(): Collection
{
return $this->agentsSharedWith;
}
public function addAgentsSharedWith(Agent $agentsSharedWith): self
{
if (!$this->agentsSharedWith->contains($agentsSharedWith)) {
$this->agentsSharedWith[] = $agentsSharedWith;
}
return $this;
}
public function removeAgentsSharedWith(Agent $agentsSharedWith): self
{
$this->agentsSharedWith->removeElement($agentsSharedWith);
return $this;
}
public function getIsShared(): ?bool
{
return $this->isShared;
}
public function setIsShared(?bool $isShared): self
{
$this->isShared = $isShared;
return $this;
}
public function getHasTitledParking(): ?bool
{
return $this->hasTitledParking;
}
public function setHasTitledParking(?bool $hasTitledParking): self
{
$this->hasTitledParking = $hasTitledParking;
return $this;
}
public function getParkingArea(): ?float
{
return $this->parkingArea;
}
public function setParkingArea(?float $parkingArea): self
{
$this->parkingArea = $parkingArea;
return $this;
}
public function getHasMezzanine(): ?bool
{
return $this->hasMezzanine;
}
public function setHasMezzanine(?bool $hasMezzanine): self
{
$this->hasMezzanine = $hasMezzanine;
return $this;
}
public function getMezzanineArea(): ?float
{
return $this->mezzanineArea;
}
public function setMezzanineArea(?float $mezzanineArea): self
{
$this->mezzanineArea = $mezzanineArea;
return $this;
}
/**
* @return string|null
*/
public function getDescriptionMandate(): ?string
{
return $this->descriptionMandate;
}
/**
* @param string|null $descriptionMandate
*
* @return $this
*/
public function setDescriptionMandate(?string $descriptionMandate): self
{
$this->descriptionMandate = $descriptionMandate;
return $this;
}
/**
* @Groups({"property_images:read","property:read","milkiya:read","mandate:read"})
* @Groups({"property_images:read","property:read","milkiya:read","mandate:read","property-visit:read"})
*/
public function getMainPhotoUrl(): ?string
{
foreach ($this->images as $image) {
if ($image->getPosition() === 1) {
return $image->contentUrl;
}
}
return null;
}
/**
* @return float
*
* @SerializedName("price")
*
* @Groups({"property:read","mandate:read"})
*/
public function getPrice(): float
{
return $this->isSale() ? $this->getMinimalPrice() : $this->getMaximumPrice();
}
/**
* @Groups({"milkiya:read"})
*/
public function getMezzanine(): array
{
return ['available' => $this->hasMezzanine, 'area' => $this->mezzanineArea];
}
/**
* @Groups({"milkiya:read"})
*/
public function getTitledParking(): array
{
return ['available' => $this->hasTitledParking, 'area' => $this->parkingArea];
}
public function isIsShortTermRental(): ?bool
{
return $this->isShortTermRental;
}
public function setIsShortTermRental(?bool $isShortTermRental): self
{
$this->isShortTermRental = $isShortTermRental;
return $this;
}
public function getDateStartRental(): ?\DateTimeInterface
{
return $this->dateStartRental;
}
public function setDateStartRental(?\DateTimeInterface $dateStartRental): self
{
$this->dateStartRental = $dateStartRental;
return $this;
}
public function getDateEndRental(): ?\DateTimeInterface
{
return $this->dateEndRental;
}
public function setDateEndRental(?\DateTimeInterface $dateEndRental): self
{
$this->dateEndRental = $dateEndRental;
return $this;
}
/**
* @return array
*/
public function getFields(): array
{
return [
'referencePropertyStatus' => 'referencePropertyStatus',
'referencePropertyType' => 'referencePropertyType',
'referenceServiceType' => 'referenceServiceType',
'contact' => 'contact',
'referencePropertyDiffusionMode' => 'referencePropertyDiffusionMode',
'minimalArea' => 'minimalArea',
'maximalArea' => 'maximalArea',
'minimalPrice' => 'minimalPrice',
'maximumPrice' => 'maximumPrice'
];
}
public function getVideoLink(): ?string
{
return $this->videoLink;
}
public function setVideoLink(?string $videoLink): self
{
$this->videoLink = $videoLink;
return $this;
}
}