package org.zheng.demo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zheng.demo.entity.OrderLineItem;
import org.zheng.demo.entity.ProductProfile;

@RestController
public class DemoController {

	@Autowired
	private DemoService testService;

	@GetMapping("/orderItems")
	List<OrderLineItem> getOrderItems() {	
		return testService.getOrderItems();
	}
	
	@GetMapping("/productProfiles")
	List<ProductProfile> getProductProfiles(){	
		return testService.getProductProfiles();
	}

}
