src/Entity/Advertisement.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\AdvertisementRepository")
  10.  * @ORM\Table(name="advertisement")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class Advertisement
  14. {
  15.     const TYPE_HOUSE 1;
  16.     const TYPE_FLAT 2;
  17.     const TYPE_GARAGE 3;
  18.     const TYPE_UNIVERSITY 4;
  19.     const TYPE_OFFICE 5;
  20.     const TYPE_FIELD 6;
  21.     const TYPE_COTTAGE 7;
  22.     const TYPE_COMMERCIAL 8;
  23.     const TYPE_PARKING 9;
  24.     const TYPE_BUILDING 10;
  25.     const TYPE_LOCAL 11;
  26.     const ALLOWED_DOCUMENTS '.pdf';
  27.     const ALLOWED_PICTURES '.jpg, .png';
  28.     const CURRENCY 'EUR';
  29.     const MANAGER_OWNER 1;
  30.     const MANAGER_AGENCY 2;
  31.     const MANAGER_OTHER 3;
  32.     const STATUS_REFUSED 0;
  33.     const STATUS_PUBLISHED 1;
  34.     const STATUS_VALIDATED 2;
  35.     const STATUS_DEACTIVATED 3;
  36.     /**
  37.      * @ORM\Id
  38.      * @ORM\GeneratedValue(strategy="AUTO")
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     private $id;
  42.     /**
  43.      * @ORM\Column(type="string", nullable=true)
  44.      */
  45.     private $polirisId;
  46.     /**
  47.      * @ORM\Column(type="string", nullable=true)
  48.      */
  49.     private $polirisProvider;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity="User", inversedBy="advertisements")
  52.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
  53.      */
  54.     private $user;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity="Agency")
  57.      * @ORM\JoinColumn(name="agency_id", referencedColumnName="id", nullable=true)
  58.      */
  59.     private $agency;
  60.     /**
  61.      * @ORM\Column(type="boolean")
  62.      * @Groups({"search_ad"})
  63.      */
  64.     private $owner 1;
  65.     /**
  66.      * @ORM\Column(type="boolean")
  67.      * @Groups({"search_ad"})
  68.      */
  69.     private $new 1;
  70.     /**
  71.      * @ORM\Column(type="boolean")
  72.      * @Groups({"search_ad"})
  73.      */
  74.     private $sale;
  75.     /**
  76.      * @Assert\NotBlank(
  77.      *     message="Veuillez sélectionner l'une de ces options"
  78.      * )
  79.      * @ORM\Column(type="integer")
  80.      * @Groups({"search_ad"})
  81.      */
  82.     private $type;
  83.     /**
  84.      * @ORM\Column(type="boolean", nullable=true)
  85.      */
  86.     private $furnished;
  87.     /**
  88.      * @ORM\Column(type="string", nullable=true)
  89.      */
  90.     private $duration;
  91.     /**
  92.      * @ORM\Column(type="boolean", nullable=true)
  93.      */
  94.     private $sublease;
  95.     /**
  96.      * @ORM\Column(type="string", nullable=true)
  97.      */
  98.     private $address;
  99.     /**
  100.      * @ORM\Column(type="string", nullable=true)
  101.      * @Groups({"search_ad"})
  102.      */
  103.     private $region;
  104.     /**
  105.      * @ORM\Column(type="string")
  106.      * @Groups({"search_ad"})
  107.      */
  108.     private $department;
  109.     /**
  110.      * @ORM\Column(type="string")
  111.      * @Groups({"search_ad"})
  112.      */
  113.     private $city;
  114.     /**
  115.      * @ORM\Column(type="float")
  116.      */
  117.     private $latitude;
  118.     /**
  119.      * @ORM\Column(type="float")
  120.      */
  121.     private $longitude;
  122.     /**
  123.      * @Assert\File(
  124.      *     maxSize = "2048k",
  125.      *     mimeTypes={ "application/pdf", "application/x-pdf" },
  126.      *     maxSizeMessage = "La taille de fichier maximum autorisé est : {{ limit }} {{ suffix }}.",
  127.      *     mimeTypesMessage = "Veuillez uploader le document au format pdf"
  128.      * )
  129.      * @ORM\Column(type="string", nullable=true)
  130.      */
  131.     private $documents;
  132.     /**
  133.      * @ORM\Column(type="boolean", nullable=true)
  134.      */
  135.     private $documentsMail 0;
  136.     /**
  137.      * @ORM\Column(type="date", nullable=true)
  138.      * @Groups({"search_ad"})
  139.      */
  140.     private $availableDate;
  141.     /**
  142.      * @Assert\NotBlank()
  143.      * @Assert\GreaterThanOrEqual(
  144.      *     value = 0
  145.      * )
  146.      * @ORM\Column(type="integer")
  147.      * @Groups({"search_ad"})
  148.      */
  149.     private $price;
  150.     /**
  151.      * @Assert\GreaterThanOrEqual(
  152.      *     value = 0
  153.      * )
  154.      * @ORM\Column(type="integer", nullable=true)
  155.      */
  156.     private $charges;
  157.     /**
  158.      * @Assert\NotBlank()
  159.      * @Assert\GreaterThanOrEqual(
  160.      *     value = 0
  161.      * )
  162.      * @ORM\Column(type="integer")
  163.      * @Groups({"search_ad"})
  164.      */
  165.     private $surface;
  166.     /**
  167.      * @Assert\NotBlank()
  168.      * @Assert\GreaterThanOrEqual(
  169.      *     value = 0
  170.      * )
  171.      * @ORM\Column(type="integer")
  172.      * @Groups({"search_ad"})
  173.      */
  174.     private $floor;
  175.     /**
  176.      * @Assert\NotBlank()
  177.      * @Assert\GreaterThanOrEqual(
  178.      *     value = 0
  179.      * )
  180.      * @ORM\Column(type="integer")
  181.      * @Groups({"search_ad"})
  182.      */
  183.     private $roomNumber;
  184.     /**
  185.      * @Assert\NotBlank()
  186.      * @Assert\GreaterThanOrEqual(
  187.      *     value = 0
  188.      * )
  189.      * @ORM\Column(type="integer")
  190.      * @Groups({"search_ad"})
  191.      */
  192.     private $bedroomNumber;
  193.     /**
  194.      * @Assert\NotBlank()
  195.      * @Assert\GreaterThanOrEqual(
  196.      *     value = 0
  197.      * )
  198.      * @ORM\Column(type="integer")
  199.      * @Groups({"search_ad"})
  200.      */
  201.     private $bathroomNumber;
  202.     /**
  203.      * @Assert\NotBlank()
  204.      * @Assert\GreaterThanOrEqual(
  205.      *     value = 0
  206.      * )
  207.      * @ORM\Column(type="integer")
  208.      */
  209.     private $toiletNumber;
  210.     /**
  211.      * @ORM\Column(type="text", nullable=true)
  212.      * @Groups({"search_ad"})
  213.      */
  214.     private $advantages;
  215.     /**
  216.      * @ORM\Column(type="string", nullable=true)
  217.      */
  218.     private $energyBalance;
  219.     /**
  220.      * @Assert\All({
  221.      *      @Assert\File(
  222.      *          mimeTypes = {"image/jpeg", "image/png"},
  223.      *          mimeTypesMessage = "Veuillez uploader des images au format JPG ou PNG"
  224.      *     )
  225.      * })
  226.      */
  227.     private $pictures;
  228.     /**
  229.      * @ORM\ManyToMany(targetEntity="Files", inversedBy="advertisement", cascade={"persist", "remove"})
  230.      * @ORM\JoinTable(name="advertisement_files",
  231.      *      joinColumns={@ORM\JoinColumn(name="advertisement_id", referencedColumnName="id",onDelete="CASCADE")},
  232.      *      inverseJoinColumns={@ORM\JoinColumn(name="file_id", referencedColumnName="id",onDelete="CASCADE")}
  233.      *      )
  234.      */
  235.     private $files;
  236.     /**
  237.      * @ORM\Column(type="string", nullable=true)
  238.      */
  239.     private $manager;
  240.     /**
  241.      * @ORM\Column(type="boolean", nullable=true)
  242.      */
  243.     private $notified;
  244.     /**
  245.      * @Assert\Regex(
  246.      *     pattern="/^(?:0|\(?\+\d{1,3}\)?\s?)[1-9](?:[\.\-\s]?\d{2}){4}$/",
  247.      *     match=true,
  248.      *     message="Ce numéro de téléphone n'est pas valide"
  249.      * )
  250.      * @Assert\Length(
  251.      *     min = 10,
  252.      *     max = 20,
  253.      *     minMessage = "Attention un numéro de téléphone doit comporter au moins {{ limit }} chiffres",
  254.      *     maxMessage = "Attention un numéro de téléphone ne peut dépasser {{ limit }} caractères"
  255.      * )
  256.      * @ORM\Column(type="string", length=255, nullable=true)
  257.      */
  258.     private $managerPhone;
  259.     /**
  260.      * @ORM\Column(type="string", nullable=true)
  261.      */
  262.     private $managerEmail;
  263.     /**
  264.      * @ORM\Column(type="string", nullable=true)
  265.      */
  266.     private $managerAgencyName;
  267.     /**
  268.      * @ORM\Column(type="string", nullable=true)
  269.      */
  270.     private $agencyFee;
  271.     /**
  272.      * @ORM\Column(type="integer", nullable=true)
  273.      */
  274.     private $appearance;
  275.     /**
  276.      * @ORM\Column(type="integer", nullable=true)
  277.      */
  278.     private $light;
  279.     /**
  280.      * @ORM\Column(type="integer", nullable=true)
  281.      */
  282.     private $noise;
  283.     /**
  284.      * @ORM\Column(type="integer", nullable=true)
  285.      */
  286.     private $insulation;
  287.     /**
  288.      * @ORM\Column(type="integer", nullable=true)
  289.      */
  290.     private $internet;
  291.     /**
  292.      * @ORM\Column(type="integer", nullable=true)
  293.      */
  294.     private $propertyRanking;
  295.     /**
  296.      * @ORM\Column(type="text", nullable=true)
  297.      */
  298.     private $opinion;
  299.     /**
  300.      * @ORM\Column(type="text", nullable=true)
  301.      */
  302.     private $strenghs;
  303.     /**
  304.      * @ORM\Column(type="text", nullable=true)
  305.      */
  306.     private $weakness;
  307.     /**
  308.      * @ORM\Column(type="integer", nullable=true)
  309.      */
  310.     private $life;
  311.     /**
  312.      * @ORM\Column(type="integer", nullable=true)
  313.      */
  314.     private $security;
  315.     /**
  316.      * @ORM\Column(type="integer", nullable=true)
  317.      */
  318.     private $cleaness;
  319.     /**
  320.      * @ORM\Column(type="integer", nullable=true)
  321.      */
  322.     private $transports;
  323.     /**
  324.      * @ORM\Column(type="integer", nullable=true)
  325.      */
  326.     private $parking;
  327.     /**
  328.      * @ORM\Column(type="integer", nullable=true)
  329.      */
  330.     private $greenArea;
  331.     /**
  332.      * @ORM\Column(type="integer", nullable=true)
  333.      */
  334.     private $shops;
  335.     /**
  336.      * @ORM\Column(type="integer", nullable=true)
  337.      */
  338.     private $neighbor;
  339.     /**
  340.      * @ORM\Column(type="integer", nullable=true)
  341.      */
  342.     private $neighbourhoodRanking;
  343.     /**
  344.      * @ORM\Column(type="text", nullable=true)
  345.      */
  346.     private $neighbourhoodDescription;
  347.     /**
  348.      * @ORM\Column(type="integer"))
  349.      * @Groups({"search_ad"})
  350.      */
  351.     private $status;
  352.     /**
  353.      * @ORM\Column(type="datetime")
  354.      */
  355.     private $createdAt;
  356.     /**
  357.      * @ORM\Column(type="datetime")
  358.      * @Groups({"search_ad"})
  359.      */
  360.     private $updatedAt;
  361.     /**
  362.      * @ORM\OneToMany(targetEntity="RentalRecord", mappedBy="advertisement")
  363.      * @ORM\OrderBy({"createdAt" = "DESC"})
  364.      */
  365.     private $rentalRecords;
  366.     /**
  367.      * @ORM\OneToMany(targetEntity="Meeting", mappedBy="advertisement")
  368.      * @ORM\OrderBy({"createdAt" = "DESC"})
  369.      * @ORM\JoinColumn(onDelete="CASCADE")
  370.      */
  371.     private $meetings;
  372.     /**
  373.      * @ORM\Column(type="text", nullable=true)
  374.      * @Groups({"search_ad"})
  375.      */
  376.     private $postalCode;
  377.     /**
  378.      * @ORM\Column(type="datetime",nullable=true)
  379.      */
  380.     private $updateDate;
  381.     /**
  382.      * @ORM\Column(type="text", nullable=true)
  383.      */
  384.     private $polirisData;
  385.     /**
  386.      * @ORM\Column(type="string", length=30,nullable=true)
  387.      */
  388.     private $uniqueId;
  389.     /**
  390.      * @var string
  391.      *
  392.      * @ORM\Column(name="raw_data", type="text",nullable=true)
  393.      */
  394.     private $rawData;
  395.     /**
  396.      * @var string
  397.      *
  398.      * @ORM\Column(name="raw_photos", type="text",nullable=true)
  399.      */
  400.     private $rawPhotos;
  401.     /**
  402.      * @var bool
  403.      *
  404.      * @ORM\Column(name="imported", type="boolean",options={"default":0})
  405.      */
  406.     private $imported;
  407.     private $noDate;
  408.     private $subleaseDuration;
  409.     public function __construct()
  410.     {
  411.         $this->pictures = new ArrayCollection();
  412.         $this->files = new ArrayCollection();
  413.         $this->advantages = new ArrayCollection();
  414.         $this->stores = new ArrayCollection();
  415.         $this->updateDate = new \DateTime();
  416.         $this->status self::STATUS_PUBLISHED;
  417.     }
  418.     public function getTitle() {
  419.         $key       = ['%category%','%type%','%roomNumber%','%surface%'];
  420.         $values    = [$this->getCategory(),$this->getTypeLabel(),$this->getRoomNumber(),$this->getSurface()];
  421.         $template =  $this->getRoomNumber()<?  "%type% %roomNumber% pièce %surface% m² " :"|%type% %roomNumber% pièces %surface% m²";
  422.         $title =  str_ireplace($key$values$template);
  423.         return $title;
  424.     }
  425.     public function hasMeeting($userId){
  426.         if(sizeof($this->meetings)>0){
  427.             foreach($this->meetings as $meeting){
  428.                 if($meeting->getUser()!=null && $meeting->getUser()->getId()==$userId){
  429.                     return true;
  430.                 }
  431.             }
  432.         }
  433.         return false;
  434.     }
  435.     /* return string rather that an object
  436.     *  @return string
  437.     */
  438.     public function __toString()
  439.     {
  440.         $title $this->getType() . ' ' $this->getRoomNumber() . ' pièces ' $this->getSurface() . ' m²';
  441.         return $title;
  442.     }
  443.     public function getCreatorType()
  444.     {
  445.         switch(true) {
  446.             case in_array('ROLE_PRO'$this->getUser()->getRoles()) :
  447.                 return 'agency';
  448.                 break;
  449.             case $this->getOwner() :
  450.                 return 'owner';
  451.                 break;
  452.             default:
  453.                 return 'renter';
  454.                 break;
  455.         }
  456.     }
  457.     public function getManagerLabel()
  458.     {
  459.         return self::getManagerLabels()[$this->manager];
  460.     }
  461.     public static function getManagerLabels() {
  462.         return [
  463.             self::MANAGER_OWNER => 'label.manager.owner',
  464.             self::MANAGER_AGENCY => 'label.manager.agency',
  465.             self::MANAGER_OTHER => 'label.manager.other',
  466.         ];
  467.     }
  468.     public function getTypeLabel()
  469.     {
  470.         return self::getTypeLabels()[$this->type];
  471.     }
  472.     public static function getTypeLabels() {
  473.         return [
  474.             self::TYPE_FLAT => 'label.type.flat',
  475.             self::TYPE_HOUSE => 'label.type.house',
  476.             self::TYPE_GARAGE => 'label.type.garage',
  477.             self::TYPE_UNIVERSITY => 'label.type.university',
  478.             self::TYPE_OFFICE => 'label.type.office',
  479.             self::TYPE_FIELD => 'label.type.field',
  480.             self::TYPE_COTTAGE => 'label.type.cottage',
  481.             self::TYPE_COMMERCIAL => 'label.type.commercial',
  482.             self::TYPE_PARKING => 'label.type.parking',
  483.             self::TYPE_BUILDING => 'label.type.building',
  484.             self::TYPE_LOCAL => 'label.type.local',
  485.         ];
  486.     }
  487.     public function getEnergyBalanceLabel()
  488.     {
  489.         return self::getEnergyBalanceLabels()[$this->energyBalance];
  490.     }
  491.     public static function getEnergyBalanceLabels() {
  492.         return [
  493.             'unknown' => 'label.unknown',
  494.             'A' => 'A',
  495.             'B' => 'B',
  496.             'C' => 'C',
  497.             'D' => 'D',
  498.             'E' => 'E',
  499.             'F' => 'F',
  500.             'G' => 'G',
  501.         ];
  502.     }
  503.     public static function getStatusLabels() {
  504.         return [
  505.             self::STATUS_REFUSED => 'label.refused',
  506.             self::STATUS_PUBLISHED => 'label.published',
  507.             self::STATUS_VALIDATED => 'label.validated',
  508.             self::STATUS_DEACTIVATED => 'label.unactivated',
  509.         ];
  510.     }
  511.     public function getStatusLabel() {
  512.         return self::getStatusLabels()[$this->status];
  513.     }
  514.     public function getCategory(){
  515.         return $this->getSale() ? 'vendre' 'louer';
  516.     }
  517.     public function getSaleLabel(){
  518.         return $this->getSale() ? 'A vendre' 'A louer';
  519.     }
  520.     /**
  521.      * @return array|null
  522.      * @Groups({"search_ad"})
  523.      */
  524.     public function getLocation()
  525.     {
  526.         return $this->latitude && $this->longitude ? ['lat' => $this->latitude'lon' => $this->longitude] : null;
  527.     }
  528.     public function updateCity()
  529.     {
  530.         if ($this->getAddress() === null) {
  531.             $this->setCity(null);
  532.         }
  533.     }
  534.     /**
  535.      * @return integer
  536.      */
  537.     public function getId()
  538.     {
  539.         return $this->id;
  540.     }
  541.     /**
  542.      * @param integer $id
  543.      *
  544.      */
  545.     public function setId($id)
  546.     {
  547.         $this->id $id;
  548.     }
  549.     /**
  550.      * @return User
  551.      */
  552.     public function getUser()
  553.     {
  554.         return $this->user;
  555.     }
  556.     /**
  557.      * @param User $user
  558.      *
  559.      * @return Advertisement
  560.      */
  561.     public function setUser(User $user)
  562.     {
  563.         $this->user $user;
  564.         return $this;
  565.     }
  566.     /**
  567.      * @return boolean
  568.      */
  569.     public function getOwner()
  570.     {
  571.         return $this->owner;
  572.     }
  573.     /**
  574.      * @param boolean $owner
  575.      */
  576.     public function setOwner($owner)
  577.     {
  578.         $this->owner = (boolean)$owner;
  579.     }
  580.     /**
  581.      * @return boolean
  582.      */
  583.     public function getSale()
  584.     {
  585.         return $this->sale;
  586.     }
  587.     /**
  588.      * @param boolean $sale
  589.      */
  590.     public function setSale($sale)
  591.     {
  592.         $this->sale = (boolean)$sale;
  593.     }
  594.     /**
  595.      * @return boolean
  596.      */
  597.     public function getFurnished()
  598.     {
  599.         return $this->furnished;
  600.     }
  601.     /**
  602.      * @param boolean $furnished
  603.      */
  604.     public function setFurnished($furnished)
  605.     {
  606.         $this->furnished $furnished;
  607.     }
  608.     /**
  609.      * @return string
  610.      */
  611.     public function getDuration()
  612.     {
  613.         return $this->duration;
  614.     }
  615.     /**
  616.      * @param string $duration
  617.      */
  618.     public function setDuration($duration)
  619.     {
  620.         $this->duration $duration;
  621.     }
  622.     /**
  623.      * @return boolean
  624.      */
  625.     public function getSublease()
  626.     {
  627.         return $this->sublease;
  628.     }
  629.     /**
  630.      * @param boolean $duration
  631.      */
  632.     public function setSublease($sublease)
  633.     {
  634.         $this->sublease $sublease;
  635.     }
  636.     /**
  637.      * @return string
  638.      */
  639.     public function getAddress()
  640.     {
  641.         return $this->address;
  642.     }
  643.     /**
  644.      * @param string $address
  645.      */
  646.     public function setAddress($address)
  647.     {
  648.         $this->address $address;
  649.     }
  650.     /**
  651.      * @return string
  652.      */
  653.     public function getCity()
  654.     {
  655.         return $this->city;
  656.     }
  657.     /**
  658.      * @param string $city
  659.      */
  660.     public function setCity($city)
  661.     {
  662.         $this->city $city;
  663.     }
  664.     /**
  665.      * @return float
  666.      */
  667.     public function getLatitude()
  668.     {
  669.         return $this->latitude;
  670.     }
  671.     /**
  672.      * @param float $latitude
  673.      */
  674.     public function setLatitude($latitude)
  675.     {
  676.         if (is_string($latitude)) {
  677.             $lat = (float)$latitude;
  678.         }
  679.         $this->latitude $latitude;
  680.     }
  681.     /**
  682.      * @return float
  683.      */
  684.     public function getLongitude()
  685.     {
  686.         return $this->longitude;
  687.     }
  688.     /**
  689.      * @param float $longitude
  690.      */
  691.     public function setLongitude($longitude)
  692.     {
  693.         if (is_string($longitude)) {
  694.             $lng = (float)$longitude;
  695.         }
  696.         $this->longitude $longitude;
  697.     }
  698.     /**
  699.      * @return string
  700.      */
  701.     public function getDocuments()
  702.     {
  703.         return $this->documents;
  704.     }
  705.     /**
  706.      * @param string $documents
  707.      */
  708.     public function setDocuments($documents)
  709.     {
  710.         $this->documents $documents;
  711.     }
  712.     /**
  713.      * @return boolean
  714.      */
  715.     public function getDocumentsMail()
  716.     {
  717.         return $this->documentsMail;
  718.     }
  719.     /**
  720.      * @param boolean $documentsMail
  721.      */
  722.     public function setDocumentsMail($documentsMail)
  723.     {
  724.         $this->documentsMail $documentsMail;
  725.     }
  726.     /**
  727.      * @return \DateTime
  728.      */
  729.     public function getAvailableDate()
  730.     {
  731.         return $this->availableDate;
  732.     }
  733.     /**
  734.      * @param \DateTime $availableDate
  735.      */
  736.     public function setAvailableDate($availableDate)
  737.     {
  738.         $this->availableDate $availableDate;
  739.     }
  740.     /**
  741.      * @return integer
  742.      */
  743.     public function getPrice()
  744.     {
  745.         return $this->price;
  746.     }
  747.     /**
  748.      * @param integer $price
  749.      */
  750.     public function setPrice($price)
  751.     {
  752.         $this->price $price;
  753.     }
  754.     /**
  755.      * @return integer
  756.      */
  757.     public function getCharges()
  758.     {
  759.         return $this->charges;
  760.     }
  761.     /**
  762.      * @param integer $charges
  763.      */
  764.     public function setCharges($charges)
  765.     {
  766.         $this->charges $charges;
  767.     }
  768.     /**
  769.      * @return integer
  770.      */
  771.     public function getSurface()
  772.     {
  773.         return $this->surface;
  774.     }
  775.     /**
  776.      * @param integer $surface
  777.      */
  778.     public function setSurface($surface)
  779.     {
  780.         $this->surface $surface;
  781.     }
  782.     /**
  783.      * @return integer
  784.      */
  785.     public function getFloor()
  786.     {
  787.         return $this->floor;
  788.     }
  789.     /**
  790.      * @param integer $floor
  791.      */
  792.     public function setFloor($floor)
  793.     {
  794.         $this->floor $floor;
  795.     }
  796.     /**
  797.      * @return integer
  798.      */
  799.     public function getRoomNumber()
  800.     {
  801.         return $this->roomNumber;
  802.     }
  803.     /**
  804.      * @param integer $roomNumber
  805.      */
  806.     public function setRoomNumber($roomNumber)
  807.     {
  808.         $this->roomNumber $roomNumber;
  809.     }
  810.     /**
  811.      * @return integer
  812.      */
  813.     public function getBedroomNumber()
  814.     {
  815.         return $this->bedroomNumber;
  816.     }
  817.     /**
  818.      * @param integer $bedroomNumber
  819.      */
  820.     public function setBedroomNumber($bedroomNumber)
  821.     {
  822.         $this->bedroomNumber $bedroomNumber;
  823.     }
  824.     /**
  825.      * @return integer
  826.      */
  827.     public function getBathroomNumber()
  828.     {
  829.         return $this->bathroomNumber;
  830.     }
  831.     /**
  832.      * @param integer $bathroomNumber
  833.      */
  834.     public function setBathroomNumber($bathroomNumber)
  835.     {
  836.         $this->bathroomNumber $bathroomNumber;
  837.     }
  838.     /**
  839.      * @return integer
  840.      */
  841.     public function getToiletNumber()
  842.     {
  843.         return $this->toiletNumber;
  844.     }
  845.     /**
  846.      * @param integer $toiletNumber
  847.      */
  848.     public function setToiletNumber($toiletNumber)
  849.     {
  850.         $this->toiletNumber $toiletNumber;
  851.     }
  852.     /**
  853.      * @return string
  854.      */
  855.     public function getAdvantages()
  856.     {
  857.         return $this->advantages;
  858.     }
  859.     /**
  860.      * @param string $advantages
  861.      */
  862.     public function setAdvantages($advantages)
  863.     {
  864.         $this->advantages $advantages;
  865.     }
  866.     /**
  867.      * @return string
  868.      */
  869.     public function getEnergyBalance()
  870.     {
  871.         return $this->energyBalance;
  872.     }
  873.     /**
  874.      * @param string $energyBalance
  875.      */
  876.     public function setEnergyBalance($energyBalance)
  877.     {
  878.         $this->energyBalance $energyBalance;
  879.     }
  880.     /**
  881.      * @return ArrayCollection
  882.      */
  883.     public function getPictures()
  884.     {
  885.         return $this->pictures;
  886.     }
  887.     /**
  888.      * @param ArrayCollection $pictures
  889.      */
  890.     public function setPictures($pictures)
  891.     {
  892.         $this->pictures $pictures;
  893.     }
  894.     /**
  895.      * @param Files $files
  896.      */
  897.     public function addFiles(Files $files)
  898.     {
  899.         $this->files[] = $files;
  900.     }
  901.     /**
  902.      * @return Collection
  903.      */
  904.     public function getFiles()
  905.     {
  906.         return $this->files;
  907.     }
  908.     /**
  909.      * @return string
  910.      */
  911.     public function getManager()
  912.     {
  913.         return $this->manager;
  914.     }
  915.     /**
  916.      * @param string $manager
  917.      */
  918.     public function setManager($manager)
  919.     {
  920.         $this->manager $manager;
  921.     }
  922.     /**
  923.      * @return boolean
  924.      */
  925.     public function getNotified()
  926.     {
  927.         return $this->notified;
  928.     }
  929.     /**
  930.      * @param boolean $notified
  931.      */
  932.     public function setNotified($notified)
  933.     {
  934.         $this->notified $notified;
  935.     }
  936.     /**
  937.      * @return integer
  938.      */
  939.     public function getManagerPhone()
  940.     {
  941.         return $this->managerPhone;
  942.     }
  943.     /**
  944.      * @param integer $managerPhone
  945.      */
  946.     public function setManagerPhone($managerPhone)
  947.     {
  948.         $this->managerPhone $managerPhone;
  949.     }
  950.     /**
  951.      * @return string
  952.      */
  953.     public function getManagerEmail()
  954.     {
  955.         return $this->managerEmail;
  956.     }
  957.     /**
  958.      * @param string $managerEmail
  959.      */
  960.     public function setManagerEmail($managerEmail)
  961.     {
  962.         $this->managerEmail $managerEmail;
  963.     }
  964.     /**
  965.      * @return integer
  966.      */
  967.     public function getAppearance()
  968.     {
  969.         return $this->appearance;
  970.     }
  971.     /**
  972.      * @param integer $appearance
  973.      */
  974.     public function setAppearance($appearance)
  975.     {
  976.         $this->appearance $appearance;
  977.     }
  978.     /**
  979.      * @return integer
  980.      */
  981.     public function getLight()
  982.     {
  983.         return $this->light;
  984.     }
  985.     /**
  986.      * @param integer $light
  987.      */
  988.     public function setLight($light)
  989.     {
  990.         $this->light $light;
  991.     }
  992.     /**
  993.      * @return integer
  994.      */
  995.     public function getNoise()
  996.     {
  997.         return $this->noise;
  998.     }
  999.     /**
  1000.      * @param integer $noise
  1001.      */
  1002.     public function setNoise($noise)
  1003.     {
  1004.         $this->noise $noise;
  1005.     }
  1006.     /**
  1007.      * @return integer
  1008.      */
  1009.     public function getInsulation()
  1010.     {
  1011.         return $this->insulation;
  1012.     }
  1013.     /**
  1014.      * @param integer $insulation
  1015.      */
  1016.     public function setInsulation($insulation)
  1017.     {
  1018.         $this->insulation $insulation;
  1019.     }
  1020.     /**
  1021.      * @return integer
  1022.      */
  1023.     public function getInternet()
  1024.     {
  1025.         return $this->internet;
  1026.     }
  1027.     /**
  1028.      * @param integer $internet
  1029.      */
  1030.     public function setInternet($internet)
  1031.     {
  1032.         $this->internet $internet;
  1033.     }
  1034.     /**
  1035.      * @return integer
  1036.      */
  1037.     public function getPropertyRanking()
  1038.     {
  1039.         return $this->propertyRanking;
  1040.     }
  1041.     /**
  1042.      * @param integer $propertyRanking
  1043.      */
  1044.     public function setPropertyRanking($propertyRanking)
  1045.     {
  1046.         $this->propertyRanking $propertyRanking;
  1047.     }
  1048.     /**
  1049.      * @return string
  1050.      */
  1051.     public function getOpinion()
  1052.     {
  1053.         return $this->opinion;
  1054.     }
  1055.     /**
  1056.      * @param string $opinion
  1057.      */
  1058.     public function setOpinion($opinion)
  1059.     {
  1060.         $this->opinion $opinion;
  1061.     }
  1062.     /**
  1063.      * @return string
  1064.      */
  1065.     public function getStrenghs()
  1066.     {
  1067.         return $this->strenghs;
  1068.     }
  1069.     /**
  1070.      * @param string $strenghs
  1071.      */
  1072.     public function setStrenghs($strenghs)
  1073.     {
  1074.         $this->strenghs $strenghs;
  1075.     }
  1076.     /**
  1077.      * @return string
  1078.      */
  1079.     public function getWeakness()
  1080.     {
  1081.         return $this->weakness;
  1082.     }
  1083.     /**
  1084.      * @param string $weakness
  1085.      */
  1086.     public function setWeakness($weakness)
  1087.     {
  1088.         $this->weakness $weakness;
  1089.     }
  1090.     /**
  1091.      * @return integer
  1092.      */
  1093.     public function getLife()
  1094.     {
  1095.         return $this->life;
  1096.     }
  1097.     /**
  1098.      * @param integer $life
  1099.      */
  1100.     public function setLife($life)
  1101.     {
  1102.         $this->life $life;
  1103.     }
  1104.     /**
  1105.      * @return integer
  1106.      */
  1107.     public function getSecurity()
  1108.     {
  1109.         return $this->security;
  1110.     }
  1111.     /**
  1112.      * @param integer $security
  1113.      */
  1114.     public function setSecurity($security)
  1115.     {
  1116.         $this->security $security;
  1117.     }
  1118.     /**
  1119.      * @return integer
  1120.      */
  1121.     public function getCleaness()
  1122.     {
  1123.         return $this->cleaness;
  1124.     }
  1125.     /**
  1126.      * @param integer $cleaness
  1127.      */
  1128.     public function setCleaness($cleaness)
  1129.     {
  1130.         $this->cleaness $cleaness;
  1131.     }
  1132.     /**
  1133.      * @return integer
  1134.      */
  1135.     public function getTransports()
  1136.     {
  1137.         return $this->transports;
  1138.     }
  1139.     /**
  1140.      * @param integer $transports
  1141.      */
  1142.     public function setTransports($transports)
  1143.     {
  1144.         $this->transports $transports;
  1145.     }
  1146.     /**
  1147.      * @return integer
  1148.      */
  1149.     public function getParking()
  1150.     {
  1151.         return $this->parking;
  1152.     }
  1153.     /**
  1154.      * @param integer $parking
  1155.      */
  1156.     public function setParking($parking)
  1157.     {
  1158.         $this->parking $parking;
  1159.     }
  1160.     /**
  1161.      * @return integer
  1162.      */
  1163.     public function getGreenArea()
  1164.     {
  1165.         return $this->greenArea;
  1166.     }
  1167.     /**
  1168.      * @param integer $greenArea
  1169.      */
  1170.     public function setGreenArea($greenArea)
  1171.     {
  1172.         $this->greenArea $greenArea;
  1173.     }
  1174.     /**
  1175.      * @return integer
  1176.      */
  1177.     public function getShops()
  1178.     {
  1179.         return $this->shops;
  1180.     }
  1181.     /**
  1182.      * @param integer $shops
  1183.      */
  1184.     public function setShops($shops)
  1185.     {
  1186.         $this->shops $shops;
  1187.     }
  1188.     /**
  1189.      * @return integer
  1190.      */
  1191.     public function getNeighbor()
  1192.     {
  1193.         return $this->neighbor;
  1194.     }
  1195.     /**
  1196.      * @param integer $neighbor
  1197.      */
  1198.     public function setNeighbor($neighbor)
  1199.     {
  1200.         $this->neighbor $neighbor;
  1201.     }
  1202.     /**
  1203.      * @return integer
  1204.      */
  1205.     public function getNeighbourhoodRanking()
  1206.     {
  1207.         return $this->neighbourhoodRanking;
  1208.     }
  1209.     /**
  1210.      * @param integer $neighbourhoodRanking
  1211.      */
  1212.     public function setNeighbourhoodRanking($neighbourhoodRanking)
  1213.     {
  1214.         $this->neighbourhoodRanking $neighbourhoodRanking;
  1215.     }
  1216.     /**
  1217.      * @return string
  1218.      */
  1219.     public function getNeighbourhoodDescription()
  1220.     {
  1221.         return $this->neighbourhoodDescription;
  1222.     }
  1223.     /**
  1224.      * @param string $neighbourhoodDescription
  1225.      */
  1226.     public function setNeighbourhoodDescription($neighbourhoodDescription)
  1227.     {
  1228.         $this->neighbourhoodDescription $neighbourhoodDescription;
  1229.     }
  1230.     /**
  1231.      * @return integer
  1232.      */
  1233.     public function getStatus()
  1234.     {
  1235.         return $this->status;
  1236.     }
  1237.     /**
  1238.      * @param integer $status
  1239.      */
  1240.     public function setStatus($status)
  1241.     {
  1242.         $this->status $status;
  1243.     }
  1244.     /**
  1245.      * @ORM\PrePersist
  1246.      */
  1247.     public function setCreatedAt()
  1248.     {
  1249.         $this->createdAt = new \DateTime();
  1250.         $this->updatedAt = new \DateTime();
  1251.     }
  1252.     /**
  1253.      * @return \DateTime
  1254.      */
  1255.     public function getCreatedAt()
  1256.     {
  1257.         return $this->createdAt;
  1258.     }
  1259.     /**
  1260.      * @ORM\PreUpdate
  1261.      */
  1262.     public function setUpdatedAt()
  1263.     {
  1264.         $this->updatedAt = new \DateTime();
  1265.     }
  1266.     /**
  1267.      * @return \DateTime
  1268.      */
  1269.     public function getUpdatedAt()
  1270.     {
  1271.         return $this->updatedAt;
  1272.     }
  1273.     /**
  1274.      * @return int
  1275.      */
  1276.     public function getType()
  1277.     {
  1278.         return $this->type;
  1279.     }
  1280.     /**
  1281.      * @param int $type
  1282.      */
  1283.     public function setType($type)
  1284.     {
  1285.         $this->type $type;
  1286.     }
  1287.     /**
  1288.      * Add file
  1289.      *
  1290.      * @param \App\Entity\Files $file
  1291.      *
  1292.      * @return Advertisement
  1293.      */
  1294.     public function addFile(\App\Entity\Files $file)
  1295.     {
  1296.         $this->files[] = $file;
  1297.         return $this;
  1298.     }
  1299.     /**
  1300.      * Remove file
  1301.      *
  1302.      * @param \App\Entity\Files $file
  1303.      */
  1304.     public function removeFile(\App\Entity\Files $file)
  1305.     {
  1306.         $this->files->removeElement($file);
  1307.     }
  1308.     /**
  1309.      * @return mixed
  1310.      */
  1311.     public function getManagerAgencyName()
  1312.     {
  1313.         return $this->managerAgencyName;
  1314.     }
  1315.     /**
  1316.      * @param mixed $managerAgencyName
  1317.      */
  1318.     public function setManagerAgencyName($managerAgencyName)
  1319.     {
  1320.         $this->managerAgencyName $managerAgencyName;
  1321.     }
  1322.     /**
  1323.      * @return mixed
  1324.      */
  1325.     public function getRegion()
  1326.     {
  1327.         return $this->region;
  1328.     }
  1329.     /**
  1330.      * @param mixed $region
  1331.      */
  1332.     public function setRegion($region)
  1333.     {
  1334.         $this->region $region;
  1335.     }
  1336.     /**
  1337.      * @return mixed
  1338.      */
  1339.     public function getDepartment()
  1340.     {
  1341.         return $this->department;
  1342.     }
  1343.     /**
  1344.      * @param mixed $department
  1345.      */
  1346.     public function setDepartment($department)
  1347.     {
  1348.         $this->department $department;
  1349.     }
  1350.     /**
  1351.      * @return mixed
  1352.      */
  1353.     public function getAgencyFee()
  1354.     {
  1355.         return $this->agencyFee;
  1356.     }
  1357.     /**
  1358.      * @param mixed $agencyFee
  1359.      */
  1360.     public function setAgencyFee($agencyFee)
  1361.     {
  1362.         $this->agencyFee $agencyFee;
  1363.     }
  1364.     public function getPolirisId()
  1365.     {
  1366.         return $this->polirisId;
  1367.     }
  1368.     public function setPolirisId($polirisId)
  1369.     {
  1370.         $this->polirisId $polirisId;
  1371.     }
  1372.     public function getPolirisProvider()
  1373.     {
  1374.         return $this->polirisProvider;
  1375.     }
  1376.     public function setPolirisProvider($polirisProvider)
  1377.     {
  1378.         $this->polirisProvider $polirisProvider;
  1379.     }
  1380.     /**
  1381.      * @return mixed
  1382.      */
  1383.     public function getNew()
  1384.     {
  1385.         return $this->new;
  1386.     }
  1387.     /**
  1388.      * @param mixed $new
  1389.      */
  1390.     public function setNew($new)
  1391.     {
  1392.         $this->new $new;
  1393.     }
  1394.     /**
  1395.      * @param mixed $rentalRecords
  1396.      */
  1397.     public function setRentalRecords($rentalRecords)
  1398.     {
  1399.         $this->rentalRecords $rentalRecords;
  1400.     }
  1401.     /**
  1402.      * @return mixed
  1403.      */
  1404.     public function getRentalRecords()
  1405.     {
  1406.         return $this->rentalRecords;
  1407.     }
  1408.     /**
  1409.      * @param mixed $meetings
  1410.      */
  1411.     public function setMeetings($meetings)
  1412.     {
  1413.         $this->meetings $meetings;
  1414.     }
  1415.     /**
  1416.      * @return mixed
  1417.      */
  1418.     public function getMeetings()
  1419.     {
  1420.         return $this->meetings;
  1421.     }
  1422.     /**
  1423.      * @return mixed
  1424.      */
  1425.     public function getGoogleData()
  1426.     {
  1427.         return $this->googleData;
  1428.     }
  1429.     /**
  1430.      * @param mixed $googleData
  1431.      */
  1432.     public function setGoogleData($googleData)
  1433.     {
  1434.         $this->googleData $googleData;
  1435.     }
  1436.     /**
  1437.      * @return mixed
  1438.      */
  1439.     public function getPostalCode()
  1440.     {
  1441.         return $this->postalCode;
  1442.     }
  1443.     /**
  1444.      * @param mixed $postalCode
  1445.      */
  1446.     public function setPostalCode($postalCode)
  1447.     {
  1448.         $this->postalCode $postalCode;
  1449.     }
  1450.     public function setNoDate($noDate){
  1451.         $this->noDate $noDate;
  1452.     }
  1453.     public function getNoDate(){
  1454.         return $this->noDate;
  1455.     }
  1456.     public function setSubleaseDuration($subleaseDuration){
  1457.         $this->subleaseDuration $subleaseDuration;
  1458.     }
  1459.     public function getSubleaseDuration(){
  1460.         return $this->subleaseDuration;
  1461.     }
  1462.     /**
  1463.      * @return mixed
  1464.      */
  1465.     public function getUpdateDate()
  1466.     {
  1467.         return $this->updateDate;
  1468.     }
  1469.     /**
  1470.      * @param mixed $updateDate
  1471.      */
  1472.     public function setUpdateDate($updateDate)
  1473.     {
  1474.         $this->updateDate $updateDate;
  1475.     }
  1476.     /**
  1477.      * @return mixed
  1478.      */
  1479.     public function getpolirisData()
  1480.     {
  1481.         return $this->polirisData;
  1482.     }
  1483.     /**
  1484.      * @param mixed $polirisData
  1485.      */
  1486.     public function setpolirisData($polirisData)
  1487.     {
  1488.         $this->polirisData $polirisData;
  1489.     }
  1490.     /**
  1491.      * @return mixed
  1492.      */
  1493.     public function getUniqueId()
  1494.     {
  1495.         return $this->uniqueId;
  1496.     }
  1497.     /**
  1498.      * @param mixed $uniqueId
  1499.      */
  1500.     public function setUniqueId($uniqueId)
  1501.     {
  1502.         $this->uniqueId $uniqueId;
  1503.     }
  1504.     /**
  1505.      * @return mixed
  1506.      */
  1507.     public function getAgency()
  1508.     {
  1509.         return $this->agency;
  1510.     }
  1511.     /**
  1512.      * @param mixed $agency
  1513.      */
  1514.     public function setAgency($agency)
  1515.     {
  1516.         $this->agency $agency;
  1517.     }
  1518.     public function getRawData()
  1519.     {
  1520.         return $this->rawData;
  1521.     }
  1522.     public function setRawData$rawData)
  1523.     {
  1524.         $this->rawData $rawData;
  1525.     }
  1526.     public function getRawPhotos()
  1527.     {
  1528.         return $this->rawPhotos;
  1529.     }
  1530.     public function setRawPhotos$rawPhotos)
  1531.     {
  1532.         $this->rawPhotos $rawPhotos;
  1533.     }
  1534.     public function isImported()
  1535.     {
  1536.         return $this->imported;
  1537.     }
  1538.     public function setImported($imported)
  1539.     {
  1540.         $this->imported $imported;
  1541.     }
  1542. }