<?php/** * Created by PhpStorm. * User: lisavandaele * Date: 30/01/15 * Time: 12:53 */namespace Notaris\AdminBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass="AssetAttachmentRepository") * @ORM\Table(name="asset_attachment") */class AssetAttachment { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\Asset", inversedBy="assetAttachments") * @ORM\JoinColumn(name="asset_id", referencedColumnName="id", onDelete="CASCADE") */ private $asset; /** * @ORM\ManyToOne(targetEntity="Notaris\AdminBundle\Entity\Attachment") * @ORM\JoinColumn(name="attachment_id", referencedColumnName="id", onDelete="CASCADE") */ private $attachment; /** * @var integer * * @ORM\Column(type="integer") */ private $position = 0; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set position * * @param integer $position * @return AssetAttachment */ public function setPosition($position) { $this->position = $position; return $this; } /** * Get position * * @return integer */ public function getPosition() { return $this->position; } /** * Set asset * * @param \Notaris\AdminBundle\Entity\Asset $asset * @return AssetAttachment */ public function setAsset(\Notaris\AdminBundle\Entity\Asset $asset = null) { $this->asset = $asset; return $this; } /** * Get asset * * @return \Notaris\AdminBundle\Entity\Asset */ public function getAsset() { return $this->asset; } /** * Set attachment * * @param \Notaris\AdminBundle\Entity\Attachment $attachment * @return AssetAttachment */ public function setAttachment(\Notaris\AdminBundle\Entity\Attachment $attachment = null) { $this->attachment = $attachment; return $this; } /** * Get attachment * * @return \Notaris\AdminBundle\Entity\Attachment */ public function getAttachment() { return $this->attachment; }}