src/OfficeBrain/Bundle/ThemeBundle/Entity/ThemeMaster.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\ThemeBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * Entity For ThemeMaster
  7.  *
  8.  * Define Themes
  9.  *
  10.  * @author OfficeBrain 4273 <info@officebrain.com>
  11.  *
  12.  */
  13. /**
  14.  * ThemeMaster
  15.  *
  16.  * @ORM\Table(name="tbl_theme_master")
  17.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\ThemeBundle\Entity\ThemeMasterRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  19.  */
  20. class ThemeMaster
  21. {
  22.     /**
  23.      * @var integer
  24.      *
  25.      * @ORM\Column(name="id", type="bigint", length=20, precision=0, scale=0, nullable=false, unique=false)
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="IDENTITY")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="theme_name", type="string", length=255, options={"collate"="utf8_unicode_ci"})
  34.      */
  35.     protected $themeName;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="theme_type", type="string", length=255, options={"collate"="utf8_unicode_ci"})
  40.      */
  41.     protected $themeType;
  42.     /**
  43.      *
  44.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceMaster", mappedBy="theme")
  45.      * @ORM\JoinColumn(nullable=false)
  46.      */
  47.     protected $theme;
  48.     /**
  49.      * @var datetime
  50.      *
  51.      * @Gedmo\Timestampable(on="create")
  52.      * @ORM\Column(type="datetime", name="created_at")
  53.      */
  54.     protected $createdAt;
  55.     /**
  56.      * @var datetime
  57.      *
  58.      * @Gedmo\Timestampable(on="update")
  59.      * @ORM\Column(type="datetime", name="updated_at", nullable=true)
  60.      */
  61.     protected $updatedAt;
  62.     /**
  63.      * @var datetime
  64.      *
  65.      * @ORM\Column(type="datetime", name="deleted_at", nullable=true)
  66.      */
  67.     protected $deletedAt;
  68.     /**
  69.      * Get id
  70.      *
  71.      * @return integer
  72.      */
  73.     public function getId()
  74.     {
  75.         return $this->id;
  76.     }
  77.     /**
  78.      * Set themeName
  79.      *
  80.      * @param string $themeName
  81.      * @return ThemeMaster
  82.      */
  83.     public function setThemeName($themeName)
  84.     {
  85.         $this->themeName $themeName;
  86.         return $this;
  87.     }
  88.     /**
  89.      * Get themeName
  90.      *
  91.      * @return string
  92.      */
  93.     public function getThemeName()
  94.     {
  95.         return $this->themeName;
  96.     }
  97.     /**
  98.      * Set themeType
  99.      *
  100.      * @param string $themeType
  101.      * @return ThemeMaster
  102.      */
  103.     public function setThemeType($themeType)
  104.     {
  105.         $this->themeType $themeType;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get themeType
  110.      *
  111.      * @return string
  112.      */
  113.     public function getThemeType()
  114.     {
  115.         return $this->themeType;
  116.     }
  117.     /**
  118.      * Set createdAt
  119.      *
  120.      * @param \DateTime $createdAt
  121.      * @return ThemeMaster
  122.      */
  123.     public function setCreatedAt($createdAt)
  124.     {
  125.         $this->createdAt $createdAt;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Get createdAt
  130.      *
  131.      * @return \DateTime
  132.      */
  133.     public function getCreatedAt()
  134.     {
  135.         return $this->createdAt;
  136.     }
  137.     /**
  138.      * Set updatedAt
  139.      *
  140.      * @param \DateTime $updatedAt
  141.      * @return ThemeMaster
  142.      */
  143.     public function setUpdatedAt($updatedAt)
  144.     {
  145.         $this->updatedAt $updatedAt;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get updatedAt
  150.      *
  151.      * @return \DateTime
  152.      */
  153.     public function getUpdatedAt()
  154.     {
  155.         return $this->updatedAt;
  156.     }
  157.     /**
  158.      * Set deletedAt
  159.      *
  160.      * @param \DateTime $deletedAt
  161.      * @return ThemeMaster
  162.      */
  163.     public function setDeletedAt($deletedAt)
  164.     {
  165.         $this->deletedAt $deletedAt;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get deletedAt
  170.      *
  171.      * @return \DateTime
  172.      */
  173.     public function getDeletedAt()
  174.     {
  175.         return $this->deletedAt;
  176.     }
  177.     /**
  178.      * Constructor
  179.      */
  180.     public function __construct()
  181.     {
  182.         $this->instanceMaster = new \Doctrine\Common\Collections\ArrayCollection();
  183.     }
  184.     /**
  185.      * Add theme
  186.      *
  187.      * @param \App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceMaster $theme
  188.      * @return ThemeMaster
  189.      */
  190.     public function addTheme(\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceMaster $theme)
  191.     {
  192.         $this->theme[] = $theme;
  193.         return $this;
  194.     }
  195.     /**
  196.      * Remove theme
  197.      *
  198.      * @param \App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceMaster $theme
  199.      */
  200.     public function removeTheme(\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceMaster $theme)
  201.     {
  202.         $this->theme->removeElement($theme);
  203.     }
  204.     /**
  205.      * Get theme
  206.      *
  207.      * @return \Doctrine\Common\Collections\Collection
  208.      */
  209.     public function getTheme()
  210.     {
  211.         return $this->theme;
  212.     }
  213. }