|
@@ -0,0 +1,43 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace Sortable\Fixture;
|
|
|
+
|
|
|
+use Gedmo\Mapping\Annotation as Gedmo;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
|
|
|
+ */
|
|
|
+class Author
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * @ORM\Id
|
|
|
+ * @ORM\GeneratedValue
|
|
|
+ * @ORM\Column(type="integer")
|
|
|
+ */
|
|
|
+ private $id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(name="name", type="string")
|
|
|
+ */
|
|
|
+ private $name;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Gedmo\SortableGroup
|
|
|
+ * @ORM\ManyToOne(targetEntity="Paper", inversedBy="authors")
|
|
|
+ */
|
|
|
+ private $paper;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Gedmo\SortablePosition
|
|
|
+ * @ORM\Column(name="position", type="integer")
|
|
|
+ */
|
|
|
+ private $position;
|
|
|
+
|
|
|
+ public function getName() { return $this->name; }
|
|
|
+ public function setName($name) { $this->name = $name; }
|
|
|
+ public function getPaper() { return $this->paper; }
|
|
|
+ public function setPaper($paper) { $this->paper = $paper; }
|
|
|
+ public function getPosition() { return $this->position; }
|
|
|
+ public function setPosition($position) { $this->position = $position; }
|
|
|
+}
|