<?php
namespace App\Domain\PropertyMatching\Adapters\Gateway\Doctrine;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Ulid;
/**
* @ORM\Entity()
* @ORM\Table(name="property_matching_specs")
*/
class PropertyMatchingSpecEntity
{
/**
* @var string|null
*
* @ORM\Id()
* @ORM\Column(type="ulid", unique=true)
*/
private ?string $uuid;
/**
* @var float|null
*
* @ORM\Column(name="living_surface", type="float", nullable=true)
*/
private ?float $livingSurface;
/**
* @var float|null
*
* @ORM\Column(name="max_living_surface", type="float", nullable=true)
*/
private ?float $maxLivingSurface;
/**
* @var int|null
*
* @ORM\Column(name="number_of_rooms", type="integer", nullable=true)
*/
private ?int $numberOfRooms;
/**
* @var int|null
*
* @ORM\Column(name="number_of_pieces", type="integer", nullable=true)
*/
private ?int $numberOfPieces;
/**
* @var float|null
*
* @ORM\Column(name="price", type="float", nullable=true)
*/
private ?float $price;
/**
* @var float|null
*
* @ORM\Column(name="max_price", type="float", nullable=true)
*/
private ?float $maxPrice;
/**
* @var array
*
* @ORM\Column(name="property_types", type="array", nullable=true)
*/
private array $propertyTypes;
/**
* @var array
*
* @ORM\Column(name="sectors", type="array", nullable=true)
*/
private array $sectors;
/**
* @var array
*
* @ORM\Column(name="features", type="array", nullable=true)
*/
private array $features;
/**
* @var PropertyMatchingEntity
*
* @ORM\OneToOne(targetEntity=PropertyMatchingEntity::class, mappedBy="specs")
*/
private PropertyMatchingEntity $matching;
public function __construct()
{
$this->uuid = (new Ulid())->toBase32();
}
/**
* @return string|null
*/
public function getUuid(): ?string
{
return $this->uuid;
}
/**
* @param string|null $uuid
*
* @return $this
*/
public function setUuid(?string $uuid): self
{
$this->uuid = $uuid;
return $this;
}
/**
* @return float|null
*/
public function getLivingSurface(): ?float
{
return $this->livingSurface;
}
/**
* @param float|null $livingSurface
*
* @return $this
*/
public function setLivingSurface(?float $livingSurface): self
{
$this->livingSurface = $livingSurface;
return $this;
}
/**
* @return float|null
*/
public function getMaxLivingSurface(): ?float
{
return $this->maxLivingSurface;
}
/**
* @param float|null $maxLivingSurface
*
* @return $this
*/
public function setMaxLivingSurface(?float $maxLivingSurface): self
{
$this->maxLivingSurface = $maxLivingSurface;
return $this;
}
/**
* @return int|null
*/
public function getNumberOfRooms(): ?int
{
return $this->numberOfRooms;
}
/**
* @param int|null $numberOfRooms
*
* @return $this
*/
public function setNumberOfRooms(?int $numberOfRooms): self
{
$this->numberOfRooms = $numberOfRooms;
return $this;
}
/**
* @return int|null
*/
public function getNumberOfPieces(): ?int
{
return $this->numberOfPieces;
}
/**
* @param int|null $numberOfPieces
*
* @return $this
*/
public function setNumberOfPieces(?int $numberOfPieces): self
{
$this->numberOfPieces = $numberOfPieces;
return $this;
}
/**
* @return float|null
*/
public function getPrice(): ?float
{
return $this->price;
}
/**
* @param float|null $price
*
* @return $this
*/
public function setPrice(?float $price): self
{
$this->price = $price;
return $this;
}
/**
* @return float|null
*/
public function getMaxPrice(): ?float
{
return $this->maxPrice;
}
/**
* @param float|null $maxPrice
*
* @return $this
*/
public function setMaxPrice(?float $maxPrice): self
{
$this->maxPrice = $maxPrice;
return $this;
}
/**
* @return array
*/
public function getPropertyTypes(): array
{
return $this->propertyTypes;
}
/**
* @param array $propertyTypes
*
* @return $this
*/
public function setPropertyTypes(array $propertyTypes): self
{
$this->propertyTypes = $propertyTypes;
return $this;
}
/**
* @return PropertyMatchingEntity
*/
public function getMatching(): PropertyMatchingEntity
{
return $this->matching;
}
/**
* @param PropertyMatchingEntity $matching
*
* @return $this
*/
public function setMatching(PropertyMatchingEntity $matching): self
{
$this->matching = $matching;
return $this;
}
/**
* @return array
*/
public function getSectors(): array
{
return $this->sectors;
}
/**
* @param array $sectors
*
* @return $this
*/
public function setSectors(array $sectors): self
{
$this->sectors = $sectors;
return $this;
}
/**
* @return array
*/
public function getFeatures(): array
{
return $this->features;
}
/**
* @param array $features
*
* @return $this
*/
public function setFeatures(array $features): self
{
$this->features = $features;
return $this;
}
}