Guest User

Untitled

a guest
Mar 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. package com.github.ajanthan.pizza.shack.MenuService.model;
  2.  
  3. import javax.persistence.Entity;
  4. import javax.persistence.GeneratedValue;
  5. import javax.persistence.GenerationType;
  6. import javax.persistence.Id;
  7.  
  8. @Entity
  9. public class MenuItem {
  10. @Id
  11. @GeneratedValue(strategy = GenerationType.AUTO)
  12. private Long id;
  13. private String name;
  14. private String description;
  15. private Double price;
  16. private String image;
  17.  
  18. public MenuItem() {
  19. }
  20.  
  21. public MenuItem(String name, String description, Double price, String image) {
  22. this.name = name;
  23. this.description = description;
  24. this.price = price;
  25. this.image = image;
  26. }
  27.  
  28. @Override
  29. public String toString() {
  30. return "MenuItem{" +
  31. "id=" + id +
  32. ", name='" + name + '\'' +
  33. ", description='" + description + '\'' +
  34. ", price=" + price +
  35. ", image='" + image + '\'' +
  36. '}';
  37. }
  38.  
  39. public Long getId() {
  40. return id;
  41. }
  42.  
  43. public void setId(Long id) {
  44. this.id = id;
  45. }
  46.  
  47. public String getName() {
  48. return name;
  49. }
  50.  
  51. public void setName(String name) {
  52. this.name = name;
  53. }
  54.  
  55. public String getDescription() {
  56. return description;
  57. }
  58.  
  59. public void setDescription(String description) {
  60. this.description = description;
  61. }
  62.  
  63. public Double getPrice() {
  64. return price;
  65. }
  66.  
  67. public void setPrice(Double price) {
  68. this.price = price;
  69. }
  70.  
  71. public String getImage() {
  72. return image;
  73. }
  74.  
  75. public void setImage(String image) {
  76. this.image = image;
  77. }
  78. }
Add Comment
Please, Sign In to add comment