1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- namespace Uploadable\Fixture\Entity;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * @ORM\Entity
- */
- class Article
- {
- /**
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @ORM\Column(name="title", type="string")
- */
- private $title;
- /**
- * @ORM\OneToMany(targetEntity="File", mappedBy="article", cascade={"persist", "remove"})
- */
- private $files;
- public function __construct()
- {
- $this->files = new ArrayCollection();
- }
- public function getId()
- {
- return $this->id;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- public function setFilePath($filePath)
- {
- $this->filePath = $filePath;
- }
- public function getFilePath()
- {
- return $this->filePath;
- }
- public function getFiles()
- {
- return $this->files;
- }
- public function addFile(File $file)
- {
- $this->files[] = $file;
- }
- }
|