src/Entity/Destination.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7.  * Destination
  8.  *
  9.  * @ORM\Table(name="destinations")
  10.  * @ORM\Entity(repositoryClass="App\Repository\DestinationRepository")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class Destination
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="country", type="string", length=255)
  27.      * @Assert\NotBlank()
  28.      */
  29.     private $country;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="region", type="string", length=255)
  34.      * @Assert\NotBlank()
  35.      *
  36.      */
  37.     private $region;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="province", type="string", length=255)
  42.      * @Assert\NotBlank()
  43.      *
  44.      */
  45.     private $province;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="population", type="string", length=255)
  50.      * @Assert\NotBlank()
  51.      *
  52.      */
  53.     private $population;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="title", type="string", length=255)
  58.      * @Assert\NotBlank()
  59.      */
  60.     private $title;
  61.     /**
  62.      * @var int
  63.      *
  64.      * @ORM\Column(name="created_id", type="integer")
  65.      */
  66.     private $createdId;
  67.     /**
  68.      * @var \DateTime
  69.      *
  70.      * @ORM\Column(name="created_at", type="datetime")
  71.      */
  72.     private $createdAt;
  73.     /**
  74.      * @var int
  75.      *
  76.      * @ORM\Column(name="updated_id", type="integer")
  77.      */
  78.     private $updatedId;
  79.     /**
  80.      * @var \DateTime
  81.      *
  82.      * @ORM\Column(name="updated_at", type="datetime")
  83.      */
  84.     private $updatedAt;
  85.     /**
  86.      * Get id
  87.      *
  88.      * @return int
  89.      */
  90.     public function getId()
  91.     {
  92.         return $this->id;
  93.     }
  94.     /**
  95.      * Set country
  96.      *
  97.      * @param string $country
  98.      *
  99.      * @return Destination
  100.      */
  101.     public function setCountry($country)
  102.     {
  103.         $this->country $country;
  104.         return $this;
  105.     }
  106.     /**
  107.      * Get country
  108.      *
  109.      * @return string
  110.      */
  111.     public function getCountry()
  112.     {
  113.         return $this->country;
  114.     }
  115.     /**
  116.      * Set province
  117.      *
  118.      * @param string $province
  119.      *
  120.      * @return Destination
  121.      */
  122.     public function setProvince($province)
  123.     {
  124.         $this->province $province;
  125.         return $this;
  126.     }
  127.     /**
  128.      * Get province
  129.      *
  130.      * @return string
  131.      */
  132.     public function getProvince()
  133.     {
  134.         return $this->province;
  135.     }
  136.     /**
  137.      * Set population
  138.      *
  139.      * @param string $population
  140.      *
  141.      * @return Destination
  142.      */
  143.     public function setPopulation($population)
  144.     {
  145.         $this->population $population;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get population
  150.      *
  151.      * @return string
  152.      */
  153.     public function getPopulation()
  154.     {
  155.         return $this->population;
  156.     }
  157.     /**
  158.      * Set title
  159.      *
  160.      * @param string $title
  161.      *
  162.      * @return Destination
  163.      */
  164.     public function setTitle($title)
  165.     {
  166.         $this->title $title;
  167.         return $this;
  168.     }
  169.     /**
  170.      * Get title
  171.      *
  172.      * @return string
  173.      */
  174.     public function getTitle()
  175.     {
  176.         return $this->title;
  177.     }
  178.     /**
  179.      * Set createdId
  180.      *
  181.      * @param integer $createdId
  182.      *
  183.      * @return Destination
  184.      */
  185.     public function setCreatedId($createdId)
  186.     {
  187.         $this->createdId $createdId;
  188.         return $this;
  189.     }
  190.     /**
  191.      * Get createdId
  192.      *
  193.      * @return integer
  194.      */
  195.     public function getCreatedId()
  196.     {
  197.         return $this->createdId;
  198.     }
  199.     /**
  200.      * Set createdAt
  201.      *
  202.      * @param \DateTime $createdAt
  203.      *
  204.      * @return Destination
  205.      */
  206.     public function setCreatedAt(\Datetime $createdAt)
  207.     {
  208.         $this->createdAt $createdAt;
  209.         return $this;
  210.     }
  211.     /**
  212.      * Get createdAt
  213.      *
  214.      * @return \DateTime
  215.      */
  216.     public function getCreatedAt()
  217.     {
  218.         return $this->createdAt;
  219.     }
  220.     /**
  221.      * Set updatedId
  222.      *
  223.      * @param integer $updatedId
  224.      *
  225.      * @return Destination
  226.      */
  227.     public function setUpdatedId($updatedId)
  228.     {
  229.         $this->updatedId $updatedId;
  230.         return $this;
  231.     }
  232.     /**
  233.      * Get updatedId
  234.      *
  235.      * @return integer
  236.      */
  237.     public function getUpdatedId()
  238.     {
  239.         return $this->updatedId;
  240.     }
  241.     /**
  242.      * Set updatedAt
  243.      *
  244.      * @param \DateTime $updatedAt
  245.      *
  246.      * @return Destination
  247.      */
  248.     public function setUpdatedAt(\Datetime $updatedAt)
  249.     {
  250.         $this->updatedAt $updatedAt;
  251.         return $this;
  252.     }
  253.     /**
  254.      * Get updatedAt
  255.      *
  256.      * @return \DateTime
  257.      */
  258.     public function getUpdatedAt()
  259.     {
  260.         return $this->updatedAt;
  261.     }
  262.     /**
  263.      * @ORM\PrePersist
  264.      */
  265.     public function setCreatedAtValue()
  266.     {
  267.         $this->createdAt = new \Datetime();
  268.     }
  269.     /**
  270.      * @ORM\PrePersist
  271.      * @ORM\PreUpdate
  272.      */
  273.     public function setUpdatedAtValue()
  274.     {
  275.         $this->updatedAt = new \Datetime();
  276.     }
  277.     /**
  278.      * Set region
  279.      *
  280.      * @param string $region
  281.      *
  282.      * @return Destination
  283.      */
  284.     public function setRegion($region)
  285.     {
  286.         $this->region $region;
  287.         return $this;
  288.     }
  289.     /**
  290.      * Get region
  291.      *
  292.      * @return string
  293.      */
  294.     public function getRegion()
  295.     {
  296.         return $this->region;
  297.     }
  298. }