class OrderServiceImpl implements OrderService {

    @Override
    public Response addNewOrder(Order order, HttpHeaders headers) {
        OrderServiceImpl.LOGGER.info("[Order Service][Admin Add Order] Ready Add Order.");
        ArrayList<Order> accountOrders = orderRepository.findByAccountId(order.getAccountId());
        if (accountOrders.contains(order)) {
            OrderServiceImpl.LOGGER.info("[Order Service][Admin Add Order] Fail.Order already exists.");
            return new Response<>(0, "Order already exist", null);
        } else {
            order.setId(UUID.randomUUID());
            orderRepository.save(order);
            OrderServiceImpl.LOGGER.info("[Order Service][Admin Add Order] Success.");
            OrderServiceImpl.LOGGER.info("[Order Service][Admin Add Order] Price: {}", order.getPrice());
            return new Response<>(1, "Add new Order Success", order);
        }
    }

}