<commit_before><?php

namespace Spolischook\RealEstateBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Spolischook\MediaBundle\Entity\Image;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * RealEstate
 *
 * @ORM\Table(name="real_estate")
 * @ORM\HasLifecycleCallbacks
 * @ORM\Entity
 */
class RealEstate
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="priceUah", type="string", length=255, nullable=true)
     */
    private $name;

    /**
     * @var integer
     *
     * @ORM\Column(name="house", type="integer")
     */
    private $house;

    /**
     * @var integer
     *
     * @ORM\Column(name="fraction", type="integer", nullable=true)
     */
    private $fraction;

    /**
     * @var integer
     *
     * @ORM\Column(name="room", type="integer", nullable=true)
     */
    private $room;

    /**
     * @var integer
     *
     * @ORM\Column(name="space", type="integer", nullable=true)
     */
    private $space;

    /**
     * @var integer
     *
     * @ORM\Column(name="living_space", type="integer", nullable=true)
     */
    private $livingSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="kitchen_space", type="integer", nullable=true)
     */
    private $kitchenSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="land_space", type="integer", nullable=true)
     */
    private $landSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="nb_floors", type="integer", nullable=true)
     */
    private $nbFloors;

    /**
     * @var integer
     *
     * @ORM\Column(name="floor", type="integer", nullable=true)
     */
    private $floor;

    /**
     * @var string
     *
     * @ORM\Column(name="building_material", type="string", columnDefinition="ENUM('brick', 'monolith', 'prefabricated', 'shells', 'clay_brick', 'wood_brick')", nullable=false)
     */
    private $buildingMaterial;

    /**
     * @var string
     *
     * @ORM\Column(name="repair", type="string", columnDefinition="ENUM('no_repair', 'prepared_under_repair', 'residential_status', 'redecorating', 'renovation', 'super_repair')", nullable=false)
     */
    private $repair;

    /**
     * @var integer
     *
     * @ORM\Column(name="price_usd", type="integer")
     */
    private $priceUsd;

    /**
     * @var string
     *
     * @ORM\Column(name="chaffer", type="boolean", nullable=true)
     */
    private $chaffer;

    /**
     * @var boolean
     *
     * @ORM\Column(name="in_stock", type="boolean", nullable=true)
     */
    private $inStock;

    /**
     * @var boolean
     *
     * @ORM\Column(name="urgently", type="boolean", nullable=true)
     */
    private $urgently;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="text", nullable=true)
     */
    private $description;

    /**
     * @var string
     *
     * @ORM\Column(name="description_ad", type="text", nullable=true)
     */
    private $descriptionAd;

    /** @ORM\ManyToOne(targetEntity="Category", inversedBy="realEstates") */
    private $category;

    /** @ORM\ManyToOne(targetEntity="TypeEstate", inversedBy="realEstates") */
    private $typeEstate;

    /** @ORM\ManyToOne(targetEntity="City", inversedBy="realEstates") */
    private $city;

    /** @ORM\ManyToOne(targetEntity="Region", inversedBy="realEstates") */
    private $region;

    /** @ORM\ManyToOne(targetEntity="Street", inversedBy="realEstates") */
    private $street;

    /** @ORM\OneToMany(targetEntity="\Spolischook\MediaBundle\Entity\Image", mappedBy="realEstate", cascade={"all"}, orphanRemoval=true) */
    private $images;

    /** @ORM\Column(name="client_name", type="string", length=255) */
    private $clientName;

    /** @ORM\Column(name="client_contact", type="string", length=255) */
    private $clientContact;

    /** @ORM\ManyToOne(targetEntity="\Spolischook\UserBundle\Entity\User") */
    private $agent;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->images = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;<commit_msg>Add validation to RealEstate Entity<commit_after><?php

namespace Spolischook\RealEstateBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Spolischook\MediaBundle\Entity\Image;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * RealEstate
 *
 * @ORM\Table(name="real_estate")
 * @ORM\HasLifecycleCallbacks
 * @ORM\Entity
 */
class RealEstate
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="priceUah", type="string", length=255, nullable=true)
     */
    private $name;

    /**
     * @var integer
     *
     * @ORM\Column(name="house", type="integer")
     */
    private $house;

    /**
     * @var integer
     *
     * @ORM\Column(name="fraction", type="integer", nullable=true)
     */
    private $fraction;

    /**
     * @var integer
     *
     * @ORM\Column(name="room", type="integer", nullable=true)
     */
    private $room;

    /**
     * @var integer
     *
     * @ORM\Column(name="space", type="integer", nullable=true)
     */
    private $space;

    /**
     * @var integer
     *
     * @ORM\Column(name="living_space", type="integer", nullable=true)
     */
    private $livingSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="kitchen_space", type="integer", nullable=true)
     */
    private $kitchenSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="land_space", type="integer", nullable=true)
     */
    private $landSpace;

    /**
     * @var integer
     *
     * @ORM\Column(name="nb_floors", type="integer", nullable=true)
     */
    private $nbFloors;

    /**
     * @var integer
     *
     * @ORM\Column(name="floor", type="integer", nullable=true)
     */
    private $floor;

    /**
     * @var string
     *
     * @Assert\NotBlank()
     * @ORM\Column(name="building_material", type="string", columnDefinition="ENUM('brick', 'monolith', 'prefabricated', 'shells', 'clay_brick', 'wood_brick')", nullable=false)
     */
    private $buildingMaterial;

    /**
     * @var string
     *
     * @Assert\NotBlank()
     * @ORM\Column(name="repair", type="string", columnDefinition="ENUM('no_repair', 'prepared_under_repair', 'residential_status', 'redecorating', 'renovation', 'super_repair')", nullable=false)
     */
    private $repair;

    /**
     * @var integer
     *
     * @Assert\NotBlank()
     * @ORM\Column(name="price_usd", type="integer")
     */
    private $priceUsd;

    /**
     * @var string
     *
     * @ORM\Column(name="chaffer", type="boolean", nullable=true)
     */
    private $chaffer;

    /**
     * @var boolean
     *
     * @ORM\Column(name="in_stock", type="boolean", nullable=true)
     */
    private $inStock;

    /**
     * @var boolean
     *
     * @ORM\Column(name="urgently", type="boolean", nullable=true)
     */
    private $urgently;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="text", nullable=true)
     */
    private $description;

    /**
     * @var string
     *
     * @ORM\Column(name="description_ad", type="text", nullable=true)
     */
    private $descriptionAd;

    /** @ORM\ManyToOne(targetEntity="Category", inversedBy="realEstates") */
    private $category;

    /** @ORM\ManyToOne(targetEntity="TypeEstate", inversedBy="realEstates") */
    private $typeEstate;

    /** @ORM\ManyToOne(targetEntity="City", inversedBy="realEstates") */
    private $city;

    /** @ORM\ManyToOne(targetEntity="Region", inversedBy="realEstates") */
    private $region;

    /** @ORM\ManyToOne(targetEntity="Street", inversedBy="realEstates") */
    private $street;

    /** @ORM\OneToMany(targetEntity="\Spolischook\MediaBundle\Entity\Image", mappedBy="realEstate", cascade={"all"}, orphanRemoval=true) */
    private $images;

    /**
     * @var string
     *
     * @Assert\NotBlank()
     * @ORM\Column(name="client_name", type="string", length=255)
     */
    private $clientName;

    /**
     * @var string
     *
     * @Assert\NotBlank()
     * @ORM\Column(name="client_contact", type="string", length=255)
     */
    private $clientContact;

    /** @ORM\ManyToOne(targetEntity="\Spolischook\UserBundle\Entity\User") */
    private $agent;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->images = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
{'fraction_non_alphanumeric': 0.174404295782526, 'fraction_numerical': 0.00201364805906701, 'mean_word_length': 2.5932475884244375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7655976', 'n_tokens_mistral': 3026, 'n_tokens_neox': 2918, 'n_words': 450}