<?php

namespace Webkul\DamBundle\Entity;

/**
 * AssetTag
 */
class AssetTag
{
    /**
     * @var integer
     */
    private $id;

    /**
     * @var string
     */
    private $code;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $asset;

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

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

    /**
     * Set code
     *
     * @param string $code
     *
     * @return AssetTag
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

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

    /**
     * Add asset
     *
     * @param \Webkul\DamBundle\Entity\Asset $asset
     *
     * @return AssetTag
     */
    public function addAsset(\Webkul\DamBundle\Entity\Asset $asset)
    {
        $this->asset[] = $asset;

        return $this;
    }

    /**
     * Remove asset
     *
     * @param \Webkul\DamBundle\Entity\Asset $asset
     */
    public function removeAsset(\Webkul\DamBundle\Entity\Asset $asset)
    {
        $this->asset->removeElement($asset);
    }

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