src/Notaris/AdminBundle/Entity/SubsiteBanner.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: lisavandaele
  5.  * Date: 30/01/15
  6.  * Time: 12:53
  7.  */
  8. namespace Notaris\AdminBundle\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. /**
  13.  * @ORM\Entity(repositoryClass="SubsiteBannerRepository")
  14.  * @ORM\Table(name="subsite_banner")
  15.  */
  16. class SubsiteBanner {
  17.     /**
  18.      * @var integer
  19.      *
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\Subsite", inversedBy="banners")
  27.      * @ORM\JoinColumn(name="subsite_id", referencedColumnName="id", onDelete="CASCADE")
  28.      */
  29.     private $subsite;
  30.     /**
  31.      * @ORM\Column(type="boolean", name="is_active")
  32.      * @Assert\Type("boolean")
  33.      */
  34.     private $isActive;
  35.     /**
  36.      * @var integer
  37.      *
  38.      * @ORM\Column(type="integer")
  39.      */
  40.     private $position = 0;
  41.     /**
  42.      * @Gedmo\Timestampable(on="create")
  43.      * @ORM\Column(name="created", type="datetime")
  44.      */
  45.     private $created;
  46.     /**
  47.      * @ORM\Column(name="updated", type="datetime")
  48.      * @Gedmo\Timestampable(on="update")
  49.      */
  50.     private $updated;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\User")
  53.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  54.      */
  55.     private $user;
  56.     /**
  57.      * @ORM\OneToOne(targetEntity="Asset", cascade={"remove"})
  58.      * @ORM\JoinColumn(name="asset_id", referencedColumnName="id")
  59.      */
  60.     protected $asset;
  61.     /**
  62.      * Get id
  63.      *
  64.      * @return integer 
  65.      */
  66.     public function getId()
  67.     {
  68.         return $this->id;
  69.     }
  70.     /**
  71.      * Set isActive
  72.      *
  73.      * @param boolean $isActive
  74.      * @return SubsiteBanner
  75.      */
  76.     public function setIsActive($isActive)
  77.     {
  78.         $this->isActive = $isActive;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Get isActive
  83.      *
  84.      * @return boolean 
  85.      */
  86.     public function getIsActive()
  87.     {
  88.         return $this->isActive;
  89.     }
  90.     /**
  91.      * Set position
  92.      *
  93.      * @param integer $position
  94.      * @return SubsiteBanner
  95.      */
  96.     public function setPosition($position)
  97.     {
  98.         $this->position = $position;
  99.         return $this;
  100.     }
  101.     /**
  102.      * Get position
  103.      *
  104.      * @return integer 
  105.      */
  106.     public function getPosition()
  107.     {
  108.         return $this->position;
  109.     }
  110.     /**
  111.      * Set created
  112.      *
  113.      * @param \DateTime $created
  114.      * @return SubsiteBanner
  115.      */
  116.     public function setCreated($created)
  117.     {
  118.         $this->created = $created;
  119.         return $this;
  120.     }
  121.     /**
  122.      * Get created
  123.      *
  124.      * @return \DateTime 
  125.      */
  126.     public function getCreated()
  127.     {
  128.         return $this->created;
  129.     }
  130.     /**
  131.      * Set updated
  132.      *
  133.      * @param \DateTime $updated
  134.      * @return SubsiteBanner
  135.      */
  136.     public function setUpdated($updated)
  137.     {
  138.         $this->updated = $updated;
  139.         return $this;
  140.     }
  141.     /**
  142.      * Get updated
  143.      *
  144.      * @return \DateTime 
  145.      */
  146.     public function getUpdated()
  147.     {
  148.         return $this->updated;
  149.     }
  150.     /**
  151.      * Set subsite
  152.      *
  153.      * @param \Notaris\AdminBundle\Entity\Subsite $subsite
  154.      * @return SubsiteBanner
  155.      */
  156.     public function setSubsite(\Notaris\AdminBundle\Entity\Subsite $subsite = null)
  157.     {
  158.         $this->subsite = $subsite;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get subsite
  163.      *
  164.      * @return \Notaris\AdminBundle\Entity\Subsite 
  165.      */
  166.     public function getSubsite()
  167.     {
  168.         return $this->subsite;
  169.     }
  170.     /**
  171.      * Set user
  172.      *
  173.      * @param \Notaris\AdminBundle\Entity\User $user
  174.      * @return SubsiteBanner
  175.      */
  176.     public function setUser(\Notaris\AdminBundle\Entity\User $user = null)
  177.     {
  178.         $this->user = $user;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get user
  183.      *
  184.      * @return \Notaris\AdminBundle\Entity\User 
  185.      */
  186.     public function getUser()
  187.     {
  188.         return $this->user;
  189.     }
  190.     /**
  191.      * Set asset
  192.      *
  193.      * @param \Notaris\AdminBundle\Entity\Asset $asset
  194.      * @return SubsiteBanner
  195.      */
  196.     public function setAsset(\Notaris\AdminBundle\Entity\Asset $asset = null)
  197.     {
  198.         $this->asset = $asset;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Get asset
  203.      *
  204.      * @return \Notaris\AdminBundle\Entity\Asset 
  205.      */
  206.     public function getAsset()
  207.     {
  208.         return $this->asset;
  209.     }
  210. }