Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.github.ajanthan.pizza.shack.MenuService.model;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- @Entity
- public class MenuItem {
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
- private String name;
- private String description;
- private Double price;
- private String image;
- public MenuItem() {
- }
- public MenuItem(String name, String description, Double price, String image) {
- this.name = name;
- this.description = description;
- this.price = price;
- this.image = image;
- }
- @Override
- public String toString() {
- return "MenuItem{" +
- "id=" + id +
- ", name='" + name + '\'' +
- ", description='" + description + '\'' +
- ", price=" + price +
- ", image='" + image + '\'' +
- '}';
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public Double getPrice() {
- return price;
- }
- public void setPrice(Double price) {
- this.price = price;
- }
- public String getImage() {
- return image;
- }
- public void setImage(String image) {
- this.image = image;
- }
- }
Add Comment
Please, Sign In to add comment