<?php

namespace OfficeBrain\Bundle\TaxBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * TaxMaster
 *
 * @ORM\Table("tbl_tax_master" , options={"type"="InnoDB","charset"="utf8","collate"="utf8_unicode_ci"})
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\TaxBundle\Entity\TaxMasterRepository")
 * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
 */
class TaxMaster
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

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

    /**
     * @var string
     *
     * @ORM\Column(name="tax_type", type="string", length=255 , columnDefinition="enum('fixed', 'percentage')")
     */
    private $taxType;

    /**
     * @var float
     *
     * @ORM\Column(name="tax_value", type="decimal",precision=11, scale=2, options={"default" = 0.00})
     */
    private $taxValue;

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

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

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

    /**
     *  @var deleteDate
     *
     * @ORM\Column(name="deleted_at", type="datetime")
     */
    private $deletedAt;

    /**
     * @ORM\OneToMany(targetEntity="TaxMapping", mappedBy="taxId")
     */
    private $taxMapping;
    
    protected $taxMappingId;

    public function getTaxMappingId()
    {
    	return $this->taxMappingId;
    }
    
    public function setTaxMappingId($taxMappingId)
    {
    	$this->taxMappingId = $taxMappingId;
    
    	return $this;
    }
    
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->taxMapping = new \Doctrine\Common\Collections\ArrayCollection();
    }

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

    /**
     * Set title
     *
     * @param string $title
     *
     * @return TaxMaster
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

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

    /**
     * Set taxType
     *
     * @param string $taxType
     *
     * @return TaxMaster
     */
    public function setTaxType($taxType)
    {
        $this->taxType = $taxType;

        return $this;
    }

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

    /**
     * Set taxValue
     *
     * @param string $taxValue
     *
     * @return TaxMaster
     */
    public function setTaxValue($taxValue)
    {
        $this->taxValue = $taxValue;

        return $this;
    }

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

    /**
     * Set status
     *
     * @param boolean $status
     *
     * @return TaxMaster
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

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

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     *
     * @return TaxMaster
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

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

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     *
     * @return TaxMaster
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

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

    /**
     * Set deletedAt
     *
     * @param \DateTime $deletedAt
     *
     * @return TaxMaster
     */
    public function setDeletedAt($deletedAt)
    {
        $this->deletedAt = $deletedAt;

        return $this;
    }

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

    /**
     * Add taxMapping
     *
     * @param \OfficeBrain\Bundle\TaxBundle\Entity\TaxMapping $taxMapping
     *
     * @return TaxMaster
     */
    public function addTaxMapping(\OfficeBrain\Bundle\TaxBundle\Entity\TaxMapping $taxMapping)
    {
        $this->taxMapping[] = $taxMapping;

        return $this;
    }

    /**
     * Remove taxMapping
     *
     * @param \OfficeBrain\Bundle\TaxBundle\Entity\TaxMapping $taxMapping
     */
    public function removeTaxMapping(\OfficeBrain\Bundle\TaxBundle\Entity\TaxMapping $taxMapping)
    {
        $this->taxMapping->removeElement($taxMapping);
    }

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