Data transfer object to get an order and its item's id's
package com.project.dto;
import java.util.ArrayList;
import java.util.List;
import com.project.model.CustomerOrder;
public class OrderItemsDTO {
private CustomerOrder order;
private List<Long> itemsId = new ArrayList<Long>();
public CustomerOrder getOrder() {
return order;
}
public void setOrder(CustomerOrder order) {
this.order = order;
}
public List<Long> getItemsId() {
return itemsId;
}
public void setItems(List<Long> itemsId) {
this.itemsId = itemsId;
}
}
// json body for this class
/*
{
"order":{
"customer":{"id":1},
"quantity": 55,
"items":[]
},
"items":[1, 2, 3]
}
*/