Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Models\Entity;
  4.  
  5. /**
  6. * @Entity @Table(name="books")
  7. **/
  8. class Book {
  9.  
  10. /**
  11. * @var int
  12. * @Id @Column(type="integer")
  13. * @GeneratedValue
  14. */
  15. protected $id;
  16.  
  17. /**
  18. * @var string
  19. * @Column(type="string")
  20. */
  21. protected $name;
  22.  
  23. /**
  24. * @var string
  25. * @Column(type="string")
  26. */
  27. protected $author;
  28.  
  29.  
  30. public function getId(){
  31. return $this->id;
  32. }
  33.  
  34. public function getName(){
  35. return $this->name;
  36. }
  37.  
  38. public function getAuthor() {
  39. return $this->author;
  40. }
  41.  
  42. public function setName($name){
  43. $this->name = $name;
  44. return $this;
  45. }
  46.  
  47. public function setAuthor($author) {
  48. $this->author = $author;
  49. return $this;
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement