Author.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Sortable\Fixture;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
  7. */
  8. class Author
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(name="name", type="string")
  18. */
  19. private $name;
  20. /**
  21. * @Gedmo\SortableGroup
  22. * @ORM\ManyToOne(targetEntity="Paper", inversedBy="authors")
  23. */
  24. private $paper;
  25. /**
  26. * @Gedmo\SortablePosition
  27. * @ORM\Column(name="position", type="integer")
  28. */
  29. private $position;
  30. public function getName() { return $this->name; }
  31. public function setName($name) { $this->name = $name; }
  32. public function getPaper() { return $this->paper; }
  33. public function setPaper($paper) { $this->paper = $paper; }
  34. public function getPosition() { return $this->position; }
  35. public function setPosition($position) { $this->position = $position; }
  36. }