sanjiisan

Untitled

Sep 13th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. //Book
  2. <?php
  3.  
  4. namespace CoderslabBundle\Entity;
  5.  
  6. use Doctrine\ORM\Mapping as ORM;
  7.  
  8. /**
  9. * Book
  10. *
  11. * @ORM\Table(name="book")
  12. * @ORM\Entity(repositoryClass="CoderslabBundle\Repository\BookRepository")
  13. */
  14. class Book
  15. {
  16. /**
  17. * @var int
  18. *
  19. * @ORM\Column(name="id", type="integer")
  20. * @ORM\Id
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. */
  23. private $id;
  24.  
  25. /**
  26. * @var string
  27. *
  28. * @ORM\Column(name="title", type="string", length=50)
  29. */
  30. private $title;
  31.  
  32. /**
  33. * @var string
  34. *
  35. * @ORM\Column(name="description", type="text")
  36. */
  37. private $description;
  38.  
  39. /**
  40. * @var float
  41. *
  42. * @ORM\Column(name="rating", type="float")
  43. */
  44. private $rating;
  45.  
  46.  
  47. /**
  48. * Get id
  49. *
  50. * @return integer
  51. */
  52. public function getId()
  53. {
  54. return $this->id;
  55. }
  56.  
  57. /**
  58. * Set title
  59. *
  60. * @param string $title
  61. * @return Book
  62. */
  63. public function setTitle($title)
  64. {
  65. $this->title = $title;
  66.  
  67. return $this;
  68. }
  69.  
  70. /**
  71. * Get title
  72. *
  73. * @return string
  74. */
  75. public function getTitle()
  76. {
  77. return $this->title;
  78. }
  79.  
  80. /**
  81. * Set description
  82. *
  83. * @param string $description
  84. * @return Book
  85. */
  86. public function setDescription($description)
  87. {
  88. $this->description = $description;
  89.  
  90. return $this;
  91. }
  92.  
  93. /**
  94. * Get description
  95. *
  96. * @return string
  97. */
  98. public function getDescription()
  99. {
  100. return $this->description;
  101. }
  102.  
  103. /**
  104. * Set rating
  105. *
  106. * @param float $rating
  107. * @return Book
  108. */
  109. public function setRating($rating)
  110. {
  111. $this->rating = $rating;
  112.  
  113. return $this;
  114. }
  115.  
  116. /**
  117. * Get rating
  118. *
  119. * @return float
  120. */
  121. public function getRating()
  122. {
  123. return $this->rating;
  124. }
  125. }
Add Comment
Please, Sign In to add comment