src/Entity/DestinationGallery.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.  * DestinationGallery
  8.  *
  9.  * @ORM\Table(name="destinations_gallery")
  10.  * @ORM\Entity(repositoryClass="App\Repository\DestinationGalleryRepository")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class DestinationGallery
  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 int
  25.      *
  26.      * @ORM\Column(name="destination_id", type="integer")
  27.      */
  28.     private $destinationId;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="image_large", type="string", length=255)
  33.      * @Assert\NotBlank()
  34.      */
  35.     private $imageLarge;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="image_medium", type="string", length=255)
  40.      */
  41.     private $imageMedium;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="image_small", type="string", length=255)
  46.      */
  47.     private $imageSmall;
  48.     /**
  49.      * @var int
  50.      *
  51.      * @ORM\Column(name="created_id", type="integer")
  52.      */
  53.     private $createdId;
  54.     /**
  55.      * @var \DateTime
  56.      *
  57.      * @ORM\Column(name="created_at", type="datetime")
  58.      */
  59.     private $createdAt;
  60.     /**
  61.      * @var int
  62.      *
  63.      * @ORM\Column(name="updated_id", type="integer")
  64.      */
  65.     private $updatedId;
  66.     /**
  67.      * @var \DateTime
  68.      *
  69.      * @ORM\Column(name="updated_at", type="datetime")
  70.      */
  71.     private $updatedAt;
  72.     /**
  73.      * Get id
  74.      *
  75.      * @return int
  76.      */
  77.     public function getId()
  78.     {
  79.         return $this->id;
  80.     }
  81.     /**
  82.      * Set destinationId
  83.      *
  84.      * @param integer $destinationId
  85.      *
  86.      * @return DestinationGallery
  87.      */
  88.     public function setDestinationId($destinationId)
  89.     {
  90.         $this->destinationId $destinationId;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get destinationId
  95.      *
  96.      * @return int
  97.      */
  98.     public function getDestinationId()
  99.     {
  100.         return $this->destinationId;
  101.     }
  102.     /**
  103.      * Set imageLarge
  104.      *
  105.      * @param string $imageLarge
  106.      *
  107.      * @return DestinationGallery
  108.      */
  109.     public function setImageLarge($imageLarge)
  110.     {
  111.         $this->imageLarge $imageLarge;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get imageLarge
  116.      *
  117.      * @return string
  118.      */
  119.     public function getImageLarge()
  120.     {
  121.         return $this->imageLarge;
  122.     }
  123.     /**
  124.      * Set imageMedium
  125.      *
  126.      * @param string $imageMedium
  127.      *
  128.      * @return DestinationGallery
  129.      */
  130.     public function setImageMedium($imageMedium)
  131.     {
  132.         $this->imageMedium $imageMedium;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get imageMedium
  137.      *
  138.      * @return string
  139.      */
  140.     public function getImageMedium()
  141.     {
  142.         return $this->imageMedium;
  143.     }
  144.     /**
  145.      * Set imageSmall
  146.      *
  147.      * @param string $imageSmall
  148.      *
  149.      * @return DestinationGallery
  150.      */
  151.     public function setImageSmall($imageSmall)
  152.     {
  153.         $this->imageSmall $imageSmall;
  154.         return $this;
  155.     }
  156.     /**
  157.      * Get imageSmall
  158.      *
  159.      * @return string
  160.      */
  161.     public function getImageSmall()
  162.     {
  163.         return $this->imageSmall;
  164.     }
  165.     /**
  166.      * Set createdId
  167.      *
  168.      * @param integer $createdId
  169.      *
  170.      * @return DestinationGallery
  171.      */
  172.     public function setCreatedId($createdId)
  173.     {
  174.         $this->createdId $createdId;
  175.         return $this;
  176.     }
  177.     /**
  178.      * Get createdId
  179.      *
  180.      * @return integer
  181.      */
  182.     public function getCreatedId()
  183.     {
  184.         return $this->createdId;
  185.     }
  186.     /**
  187.      * Set createdAt
  188.      *
  189.      * @param \DateTime $createdAt
  190.      *
  191.      * @return DestinationGallery
  192.      */
  193.     public function setCreatedAt(\Datetime $createdAt)
  194.     {
  195.         $this->createdAt $createdAt;
  196.         return $this;
  197.     }
  198.     /**
  199.      * Get createdAt
  200.      *
  201.      * @return \DateTime
  202.      */
  203.     public function getCreatedAt()
  204.     {
  205.         return $this->createdAt;
  206.     }
  207.     /**
  208.      * Set updatedId
  209.      *
  210.      * @param integer $updatedId
  211.      *
  212.      * @return DestinationGallery
  213.      */
  214.     public function setUpdatedId($updatedId)
  215.     {
  216.         $this->updatedId $updatedId;
  217.         return $this;
  218.     }
  219.     /**
  220.      * Get updatedId
  221.      *
  222.      * @return integer
  223.      */
  224.     public function getUpdatedId()
  225.     {
  226.         return $this->updatedId;
  227.     }
  228.     /**
  229.      * Set updatedAt
  230.      *
  231.      * @param \DateTime $updatedAt
  232.      *
  233.      * @return DestinationGallery
  234.      */
  235.     public function setUpdatedAt(\Datetime $updatedAt)
  236.     {
  237.         $this->updatedAt $updatedAt;
  238.         return $this;
  239.     }
  240.     /**
  241.      * Get updatedAt
  242.      *
  243.      * @return \DateTime
  244.      */
  245.     public function getUpdatedAt()
  246.     {
  247.         return $this->updatedAt;
  248.     }
  249.     /**
  250.      * @ORM\PrePersist
  251.      */
  252.     public function setCreatedAtValue()
  253.     {
  254.         $this->createdAt = new \Datetime();
  255.     }
  256.     /**
  257.      * @ORM\PrePersist
  258.      * @ORM\PreUpdate
  259.      */
  260.     public function setUpdatedAtValue()
  261.     {
  262.         $this->updatedAt = new \Datetime();
  263.     }
  264. }