src/Domain/PropertyMatching/Adapters/Gateway/Doctrine/PropertyMatchingSpecEntity.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Domain\PropertyMatching\Adapters\Gateway\Doctrine;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Uid\Ulid;
  5. /**
  6.  * @ORM\Entity()
  7.  * @ORM\Table(name="property_matching_specs")
  8.  */
  9. class PropertyMatchingSpecEntity
  10. {
  11.     /**
  12.      * @var string|null
  13.      *
  14.      * @ORM\Id()
  15.      * @ORM\Column(type="ulid", unique=true)
  16.      */
  17.     private ?string $uuid;
  18.     /**
  19.      * @var float|null
  20.      *
  21.      * @ORM\Column(name="living_surface", type="float", nullable=true)
  22.      */
  23.     private ?float $livingSurface;
  24.     /**
  25.      * @var float|null
  26.      *
  27.      * @ORM\Column(name="max_living_surface", type="float", nullable=true)
  28.      */
  29.     private ?float $maxLivingSurface;
  30.     /**
  31.      * @var int|null
  32.      *
  33.      * @ORM\Column(name="number_of_rooms", type="integer", nullable=true)
  34.      */
  35.     private ?int $numberOfRooms;
  36.     /**
  37.      * @var int|null
  38.      *
  39.      * @ORM\Column(name="number_of_pieces", type="integer", nullable=true)
  40.      */
  41.     private ?int $numberOfPieces;
  42.     /**
  43.      * @var float|null
  44.      *
  45.      * @ORM\Column(name="price", type="float", nullable=true)
  46.      */
  47.     private ?float $price;
  48.     /**
  49.      * @var float|null
  50.      *
  51.      * @ORM\Column(name="max_price", type="float", nullable=true)
  52.      */
  53.     private ?float $maxPrice;
  54.     /**
  55.      * @var array
  56.      *
  57.      * @ORM\Column(name="property_types", type="array", nullable=true)
  58.      */
  59.     private array $propertyTypes;
  60.     /**
  61.      * @var array
  62.      *
  63.      * @ORM\Column(name="sectors", type="array", nullable=true)
  64.      */
  65.     private array $sectors;
  66.     /**
  67.      * @var array
  68.      *
  69.      * @ORM\Column(name="features", type="array", nullable=true)
  70.      */
  71.     private array $features;
  72.     /**
  73.      * @var PropertyMatchingEntity
  74.      *
  75.      * @ORM\OneToOne(targetEntity=PropertyMatchingEntity::class, mappedBy="specs")
  76.      */
  77.     private PropertyMatchingEntity $matching;
  78.     public function __construct()
  79.     {
  80.         $this->uuid = (new Ulid())->toBase32();
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getUuid(): ?string
  86.     {
  87.         return $this->uuid;
  88.     }
  89.     /**
  90.      * @param string|null $uuid
  91.      *
  92.      * @return $this
  93.      */
  94.     public function setUuid(?string $uuid): self
  95.     {
  96.         $this->uuid $uuid;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return float|null
  101.      */
  102.     public function getLivingSurface(): ?float
  103.     {
  104.         return $this->livingSurface;
  105.     }
  106.     /**
  107.      * @param float|null $livingSurface
  108.      *
  109.      * @return $this
  110.      */
  111.     public function setLivingSurface(?float $livingSurface): self
  112.     {
  113.         $this->livingSurface $livingSurface;
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return float|null
  118.      */
  119.     public function getMaxLivingSurface(): ?float
  120.     {
  121.         return $this->maxLivingSurface;
  122.     }
  123.     /**
  124.      * @param float|null $maxLivingSurface
  125.      *
  126.      * @return $this
  127.      */
  128.     public function setMaxLivingSurface(?float $maxLivingSurface): self
  129.     {
  130.         $this->maxLivingSurface $maxLivingSurface;
  131.         return $this;
  132.     }
  133.     /**
  134.      * @return int|null
  135.      */
  136.     public function getNumberOfRooms(): ?int
  137.     {
  138.         return $this->numberOfRooms;
  139.     }
  140.     /**
  141.      * @param int|null $numberOfRooms
  142.      *
  143.      * @return $this
  144.      */
  145.     public function setNumberOfRooms(?int $numberOfRooms): self
  146.     {
  147.         $this->numberOfRooms $numberOfRooms;
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return int|null
  152.      */
  153.     public function getNumberOfPieces(): ?int
  154.     {
  155.         return $this->numberOfPieces;
  156.     }
  157.     /**
  158.      * @param int|null $numberOfPieces
  159.      *
  160.      * @return $this
  161.      */
  162.     public function setNumberOfPieces(?int $numberOfPieces): self
  163.     {
  164.         $this->numberOfPieces $numberOfPieces;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return float|null
  169.      */
  170.     public function getPrice(): ?float
  171.     {
  172.         return $this->price;
  173.     }
  174.     /**
  175.      * @param float|null $price
  176.      *
  177.      * @return $this
  178.      */
  179.     public function setPrice(?float $price): self
  180.     {
  181.         $this->price $price;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return float|null
  186.      */
  187.     public function getMaxPrice(): ?float
  188.     {
  189.         return $this->maxPrice;
  190.     }
  191.     /**
  192.      * @param float|null $maxPrice
  193.      *
  194.      * @return $this
  195.      */
  196.     public function setMaxPrice(?float $maxPrice): self
  197.     {
  198.         $this->maxPrice $maxPrice;
  199.         return $this;
  200.     }
  201.     /**
  202.      * @return array
  203.      */
  204.     public function getPropertyTypes(): array
  205.     {
  206.         return $this->propertyTypes;
  207.     }
  208.     /**
  209.      * @param array $propertyTypes
  210.      *
  211.      * @return $this
  212.      */
  213.     public function setPropertyTypes(array $propertyTypes): self
  214.     {
  215.         $this->propertyTypes $propertyTypes;
  216.         return $this;
  217.     }
  218.     /**
  219.      * @return PropertyMatchingEntity
  220.      */
  221.     public function getMatching(): PropertyMatchingEntity
  222.     {
  223.         return $this->matching;
  224.     }
  225.     /**
  226.      * @param PropertyMatchingEntity $matching
  227.      *
  228.      * @return $this
  229.      */
  230.     public function setMatching(PropertyMatchingEntity $matching): self
  231.     {
  232.         $this->matching $matching;
  233.         return $this;
  234.     }
  235.     /**
  236.      * @return array
  237.      */
  238.     public function getSectors(): array
  239.     {
  240.         return $this->sectors;
  241.     }
  242.     /**
  243.      * @param array $sectors
  244.      *
  245.      * @return $this
  246.      */
  247.     public function setSectors(array $sectors): self
  248.     {
  249.         $this->sectors $sectors;
  250.         return $this;
  251.     }
  252.     /**
  253.      * @return array
  254.      */
  255.     public function getFeatures(): array
  256.     {
  257.         return $this->features;
  258.     }
  259.     /**
  260.      * @param array $features
  261.      *
  262.      * @return $this
  263.      */
  264.     public function setFeatures(array $features): self
  265.     {
  266.         $this->features $features;
  267.         return $this;
  268.     }
  269. }