<?php

namespace OfficeBrain\Bundle\BlogBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;



/**
 * Category
 *
 * @ORM\Table("tbl_blog_category")
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\BlogBundle\Entity\CategoryRepository")
 */
class Category
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="category_name", type="string", length=255)
     * @Assert\NotBlank(message="This field is required.")
     */
    private $categoryName;

    /**
     * @var string
     * @Gedmo\Slug(fields={"categoryName","id"})
     * @ORM\Column(length=128, unique=true,nullable=true)
     */
    private $slug;

    /**
     * @var string
     *
     * @ORM\Column(name="category_content", type="text")
     * @Assert\NotBlank(message="This field is required.")
     * 
     */
    private $categoryContent;

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

    /**
     * @var string
     *
     * @ORM\Column(name="meta_category_desc", type="text")
     * 
     * 
     */
    private $metaCategoryDesc;

    /**
     * @var boolean
     *
     * @ORM\Column(name="category_status", type="boolean", options={"default" = 1})
     */
    private $categoryStatus;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="category_created_date", type="datetime")
     * @Gedmo\Timestampable(on="create")
     */
    private $categoryCreatedDate;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="catogory_updated_date", type="datetime")
     * @Gedmo\Timestampable(on="update")
     */
    private $catogoryUpdatedDate;

    /**
     * @var boolean
     *
     * @ORM\Column(name="category_is_deleted", type="boolean", options={"default" = 0})
     */
    private $categoryIsDeleted;
    
    /**
     * @ORM\OneToMany(targetEntity="PostCategoryInfo", mappedBy="categoryId")
     */
    protected $postCategoryInfo;

   
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->postCategoryInfo = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set categoryName
     *
     * @param string $categoryName
     * @return Category
     */
    public function setCategoryName($categoryName)
    {
        $this->categoryName = $categoryName;

        return $this;
    }

    /**
     * Get categoryName
     *
     * @return string 
     */
    public function getCategoryName()
    {
        return $this->categoryName;
    }

    /**
     * Set categoryTitle
     *
     * @param string $categoryTitle
     * @return Category
     */
    public function setCategoryTitle($categoryTitle)
    {
        $this->categoryTitle = $categoryTitle;

        return $this;
    }

    /**
     * Get categoryTitle
     *
     * @return string 
     */
    public function getCategoryTitle()
    {
        return $this->categoryTitle;
    }

    /**
     * Set categoryStatus
     *
     * @param boolean $categoryStatus
     * @return Category
     */
    public function setCategoryStatus($categoryStatus)
    {
        $this->categoryStatus = $categoryStatus;

        return $this;
    }

    /**
     * Get categoryStatus
     *
     * @return boolean 
     */
    public function getCategoryStatus()
    {
        return $this->categoryStatus;
    }



    /**
     * Set categoryContent
     *
     * @param boolean $categoryContent
     * @return Category
     */
    public function setCategoryContent($categoryContent)
    {
        $this->categoryContent = $categoryContent;

        return $this;
    }

    /**
     * Get categoryContent
     *
     * @return boolean 
     */
    public function getCategoryContent()
    {
        return $this->categoryContent;
    }

    /**
     * Set metaCategoryTitle
     *
     * @param boolean $metaCategoryTitle
     * @return Category
     */
    public function setMetaCategoryTitle($metaCategoryTitle)
    {
        $this->metaCategoryTitle = $metaCategoryTitle;

        return $this;
    }

    /**
     * Get metaCategoryTitle
     *
     * @return boolean 
     */
    public function getMetaCategoryTitle()
    {
        return $this->metaCategoryTitle;
    }


    /**
     * Set metaCategoryDesc
     *
     * @param boolean $metaCategoryDesc
     * @return Category
     */
    public function setMetaCategoryDesc($metaCategoryDesc)
    {
        $this->metaCategoryDesc = $metaCategoryDesc;

        return $this;
    }

    /**
     * Get metaCategoryDesc
     *
     * @return boolean 
     */
    public function getMetaCategoryDesc()
    {
        return $this->metaCategoryDesc;
    }



    /**
     * Set categoryCreatedDate
     *
     * @param \DateTime $categoryCreatedDate
     * @return Category
     */
    public function setCategoryCreatedDate($categoryCreatedDate)
    {
        $this->categoryCreatedDate = $categoryCreatedDate;

        return $this;
    }

    /**
     * Get categoryCreatedDate
     *
     * @return \DateTime 
     */
    public function getCategoryCreatedDate()
    {
        return $this->categoryCreatedDate;
    }

    /**
     * Set catogoryUpdatedDate
     *
     * @param \DateTime $catogoryUpdatedDate
     * @return Category
     */
    public function setCatogoryUpdatedDate($catogoryUpdatedDate)
    {
        $this->catogoryUpdatedDate = $catogoryUpdatedDate;

        return $this;
    }

    /**
     * Get catogoryUpdatedDate
     *
     * @return \DateTime 
     */
    public function getCatogoryUpdatedDate()
    {
        return $this->catogoryUpdatedDate;
    }

    /**
     * Set categoryIsDeleted
     *
     * @param boolean $categoryIsDeleted
     * @return Category
     */
    public function setCategoryIsDeleted($categoryIsDeleted)
    {
        $this->categoryIsDeleted = $categoryIsDeleted;

        return $this;
    }

    /**
     * Get categoryIsDeleted
     *
     * @return boolean 
     */
    public function getCategoryIsDeleted()
    {
        return $this->categoryIsDeleted;
    }

    /**
     * Add postCategoryInfo
     *
     * @param \OfficeBrain\Bundle\BlogBundle\Entity\PostCategoryInfo $postCategoryInfo
     * @return Category
     */
    public function addPostCategoryInfo(\OfficeBrain\Bundle\BlogBundle\Entity\PostCategoryInfo $postCategoryInfo)
    {
        $this->postCategoryInfo[] = $postCategoryInfo;

        return $this;
    }

    /**
     * Remove postCategoryInfo
     *
     * @param \OfficeBrain\Bundle\BlogBundle\Entity\PostCategoryInfo $postCategoryInfo
     */
    public function removePostCategoryInfo(\OfficeBrain\Bundle\BlogBundle\Entity\PostCategoryInfo $postCategoryInfo)
    {
        $this->postCategoryInfo->removeElement($postCategoryInfo);
    }

    /**
     * Get postCategoryInfo
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getPostCategoryInfo()
    {
        return $this->postCategoryInfo;
    }

    /**
     * Set slug
     *
     * @param string $slug
     * @return Category
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;

        return $this;
    }

    /**
     * Get slug
     *
     * @return string 
     */
    public function getSlug()
    {
        return $this->slug;
    }
}
