GDCPizza is an internal tool to manage a small catalog of pizzas and their ingredients. Ingredients have a cost. Pizzas have a selling price and are made from several ingredients. The selling price of a pizza equals the total cost of its ingredients plus 50% for the preparation. Users should be able to: - Create, read, update, delete ingredients - Create, read, update, delete pizzas - Add or remove ingredients to a pizza - Change the ingredients' order in the recipe - Retrieve the list of pizza and their selling prices Expected results: - A database schema - An API schema ------- ## Entity Ingredient * Int id * String name * Float price Pizza * Int id * String Name * Array IngredientList * (PriceCalculator: Float) ## Route Ingredient * Create: POST ingredient {name, price} * Read: GET ingredient/{id} * Update: PUT ingredient/{id} {name*, price*} * Delete: DELETE ingredient/{id} Pizza * Create: POST pizza {name, [IngredientList]} * Read: GET pizza/{id} * Update: PUT pizza/{id} {name*, [IngredientList]*} * Delete: DELETE pizza/{id} * Liste des ingrédient d'une pizza : GET pizza/{Id}/ingredients * Liste de toutes les pizza : GET pizza * Liste de pizza avec prix max : GET Pizza?maxPrice
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up