package kz.cafe.client.rest.wrappers;

import java.util.*;
import javax.xml.bind.annotation.*;

@XmlRootElement(name="response")
public class JROrderListResponse extends JRAbstractDeleteableResponse{
   
   @XmlElementWrapper(name="orders")   
   @XmlElement(name="item")   
   public List<JMOrder> items = new ArrayList<JMOrder>();
   
   
   public JMOrder add(){
      JMOrder jmMenuItem = new JMOrder();
      items.add(jmMenuItem);
      
      return jmMenuItem;
   }
   
   
   
   
   public static class JMOrder{
      public Integer ID;
      public Integer CID;
      public Integer AID;
      
      

      @XmlElementWrapper(name="meals")
      @XmlElement(name="item")
      public List<JMMeal> ingredients = new ArrayList<JMMeal>();

      
      public JMMeal add(){
         JMMeal jmMeal = new JMMeal();
         ingredients.add(jmMeal);
         
         return jmMeal;
      }
      
      
      
      public static class JMMeal{
         public long IID;
         public int  quantity;
      }
   }

   
   
   
   

   public JROrderListResponse(){
   }


   public JROrderListResponse(Throwable e){
      super(e);
   }
}
