CmsEmployee.php 665B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Doctrine\Tests\Models\CMS;
  3. /**
  4. * Description of CmsEmployee
  5. *
  6. * @author robo
  7. * @Entity
  8. * @Table(name="cms_employees")
  9. */
  10. class CmsEmployee
  11. {
  12. /**
  13. * @Id
  14. * @Column(type="integer")
  15. * @GeneratedValue
  16. */
  17. private $id;
  18. /**
  19. * @Column
  20. */
  21. private $name;
  22. /**
  23. * @OneToOne(targetEntity="CmsEmployee")
  24. * @JoinColumn(name="spouse_id", referencedColumnName="id")
  25. */
  26. private $spouse;
  27. public function getId() {
  28. return $this->id;
  29. }
  30. public function getName() {
  31. return $this->name;
  32. }
  33. public function getSpouse() {
  34. return $this->spouse;
  35. }
  36. }