Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. /src/AppBundle/Entity/Account.php:
  2.  
  3. <?php
  4.  
  5. namespace AppBundle\Entity;
  6.  
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Doctrine\ORM\Mapping\UniqueConstraint;
  9. use Doctrine\ORM\Mapping\SequenceGenerator;
  10.  
  11. /**
  12. * @ORM\Entity
  13. * @ORM\Table(name="account")
  14. */
  15. class Account {
  16.  
  17. /**
  18. * @ORM\Column(type="integer", nullable=false)
  19. * @ORM\Id
  20. * @ORM\GeneratedValue(strategy="AUTO")
  21. */
  22. private $id;
  23.  
  24. /**
  25. * @ORM\Column(type="string", length=100, unique=true)
  26. */
  27. private $username;
  28.  
  29. /**
  30. * @ORM\Column(type="string", length=100)
  31. */
  32. private $password;
  33.  
  34. public function __construct($username) {
  35. $this->username = $username;
  36. }
  37.  
  38. function setPassword ($password) {
  39. $this->password = $password;
  40. }
  41.  
  42. function getUsername() {
  43. return $this->username;
  44. }
  45.  
  46. function getPassword() {
  47. return $this->password;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement