Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 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. public $id;
  16.  
  17. /**
  18. * @var string
  19. * @Column(type="string")
  20. */
  21. public $name;
  22.  
  23. /**
  24. * @var string
  25. * @Column(type="string")
  26. */
  27. public $author;
  28.  
  29. /**
  30. * @return int id
  31. */
  32. public function getId(){
  33. return $this->id;
  34. }
  35.  
  36. /**
  37. * @return string name
  38. */
  39. public function getName(){
  40. return $this->name;
  41. }
  42.  
  43. /**
  44. * @return string author
  45. */
  46. public function getAuthor() {
  47. return $this->author;
  48. }
  49.  
  50. /**
  51. * @return Book()
  52. */
  53. public function setName($name){
  54. $this->name = $name;
  55. return $this;
  56. }
  57.  
  58. /**
  59. * @return Book()
  60. */
  61. public function setAuthor($author) {
  62. $this->author = $author;
  63. return $this;
  64. }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement