User.php 839 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Mapping\Fixture;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Mock\Extension\Encoder\Mapping as Ext;
  5. /**
  6. * @ORM\Table(name="test_users")
  7. * @ORM\Entity
  8. */
  9. class User
  10. {
  11. /**
  12. * @ORM\Column(type="integer")
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. */
  16. private $id;
  17. /**
  18. * @Ext\Encode(type="sha1", secret="xxx")
  19. * @ORM\Column(length=64)
  20. */
  21. private $name;
  22. /**
  23. * @Ext\Encode(type="md5")
  24. * @ORM\Column(length=32)
  25. */
  26. private $password;
  27. public function setName($name)
  28. {
  29. $this->name = $name;
  30. }
  31. public function getName()
  32. {
  33. return $this->name;
  34. }
  35. public function setPassword($password)
  36. {
  37. $this->password = $password;
  38. }
  39. public function getPassword()
  40. {
  41. return $this->password;
  42. }
  43. }