package com.pizza.model;

import java.util.Arrays;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pizza.controller.ItemJacksonSerializer;

@JsonSerialize(using = ItemJacksonSerializer.class)
public enum Item {
	PIZZA_SLICE("Pizza Slice", 12.5),
	GREEK_SALAD("Greek Salad", 27.0),
	KALZONE("Kalzone", 25.0);
	
	private final String pretty;
	private final double price;
	
	private Item (String pretty, double price) {
		this.pretty = pretty;
		this.price = price;
	}
	
	public String getPretty() {
		return pretty;
	}
	
	public double getPrice() {
		return price;
	}

	public static List<Item> getAllItemsAsList() {
		return Arrays.asList(Item.values());
	}	
	
}

@@ -325,16 +325,47 @@
  27.0),%0A
+%09HOME_SALAD(%22%D7%A1%D7%9C%D7%98 %D7%94%D7%91%D7%99%D7%AA%22, 25.0),%0A
 %09KALZONE
@@ -381,16 +381,19 @@
 %22, 25.0)
+,%0A%09
 ;%0A%09%0A%09pri

add item