Advertisement
Guest User

Model

a guest
Jan 11th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.87 KB | None | 0 0
  1. package com.water_group.waterordering.Model;
  2.  
  3.  
  4. public class Food {
  5.     private String Name, Image, Description, Price, MenuId, Stock;
  6.  
  7.  
  8.     public Food() {
  9.  
  10.     }
  11.  
  12.     public Food(String name, String image, String description, String price, String stock, String menuId) {
  13.         this.Name = name;
  14.         this.Image = image;
  15.         this.Description = description;
  16.         this.Price = price;
  17.         this.Stock = stock;
  18.         this.MenuId = menuId;
  19.     }
  20.  
  21.     public String getName() {
  22.         return Name;
  23.     }
  24.  
  25.     public void setName(String name) {
  26.         Name = name;
  27.     }
  28.  
  29.     public String getImage() {
  30.         return Image;
  31.     }
  32.  
  33.     public void setImage(String image) {
  34.         Image = image;
  35.     }
  36.  
  37.     public String getDescription() {
  38.         return Description;
  39.     }
  40.  
  41.     public void setDescription(String description) {
  42.         Description = description;
  43.     }
  44.  
  45.     public String getPrice() {
  46.         return Price;
  47.     }
  48.  
  49.     public void setPrice(String price) {
  50.         Price = price;
  51.     }
  52.  
  53.     public String getStock() {
  54.         return Stock;
  55.     }
  56.  
  57.     public void setStock(String stock) {
  58.         Stock = stock;
  59.     }
  60.  
  61.     public String getMenuId() {
  62.         return MenuId;
  63.     }
  64.  
  65.     public void setMenuId(String menuId) {
  66.         MenuId = menuId;
  67.     }
  68. }
  69.  
  70. package com.water_group.waterordering.Model;
  71.  
  72.  
  73. public class Order {
  74.     private String ProductId;
  75.     private String ProductName;
  76.     private String Quantity;
  77.     private String Price;
  78.  
  79.     public Order(){}
  80.     public Order(String productId, String productName, String quantity, String price) {
  81.         this.ProductId = productId;
  82.         this.ProductName = productName;
  83.         this.Quantity = quantity;
  84.         this.Price = price;
  85.     }
  86.  
  87.     public String getProductId() {
  88.         return ProductId;
  89.     }
  90.  
  91.     public void setProductId(String productId) {
  92.         ProductId = productId;
  93.     }
  94.  
  95.     public String getProductName() {
  96.         return ProductName;
  97.     }
  98.  
  99.     public void setProductName(String productName) {
  100.         ProductName = productName;
  101.     }
  102.  
  103.     public String getQuantity() {
  104.         return Quantity;
  105.     }
  106.  
  107.     public void setQuantity(String quantity) {
  108.         Quantity = quantity;
  109.     }
  110.  
  111.     public String getPrice() {
  112.         return Price;
  113.     }
  114.  
  115.     public void setPrice(String price) {
  116.         Price = price;
  117.     }
  118.  
  119. }
  120.  
  121.  
  122. package com.water_group.waterordering.Model;
  123.  
  124. import java.util.List;
  125.  
  126.  
  127.  
  128. public class Request {
  129.     private String phone;
  130.     private String name;
  131.     private String address;
  132.     private String total;
  133.     private String status;
  134.     private List<Order> foods; // list of food order
  135.  
  136.     public Request() {
  137.  
  138.     }
  139.  
  140.     public Request(String phone, String name, String address, String total, List<Order> foods) {
  141.         this.phone = phone;
  142.         this.name = name;
  143.         this.address = address;
  144.         this.total = total;
  145.         this.foods = foods;
  146.         this.status = "0"; // Default is 0
  147.     }
  148.  
  149.     public String getStatus() {
  150.         return status;
  151.     }
  152.  
  153.     public void setStatus(String status) {
  154.         this.status = status;
  155.     }
  156.  
  157.     public String getPhone() {
  158.         return phone;
  159.     }
  160.  
  161.     public void setPhone(String phone) {
  162.         this.phone = phone;
  163.     }
  164.  
  165.     public String getName() {
  166.         return name;
  167.     }
  168.  
  169.     public void setName(String name) {
  170.         this.name = name;
  171.     }
  172.  
  173.     public String getAddress() {
  174.         return address;
  175.     }
  176.  
  177.     public void setAddress(String address) {
  178.         this.address = address;
  179.     }
  180.  
  181.     public String getTotal() {
  182.         return total;
  183.     }
  184.  
  185.     public void setTotal(String total) {
  186.         this.total = total;
  187.     }
  188.  
  189.     public List<Order> getFoods() {
  190.         return foods;
  191.     }
  192.  
  193.     public void setFoods(List<Order> foods) {
  194.         this.foods = foods;
  195.     }
  196. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement